From 5950c773ebeff39486f9d4668a49a20896e7d645 Mon Sep 17 00:00:00 2001 From: shiyang Date: Sat, 25 Sep 2021 16:41:27 +0800 Subject: [PATCH] =?UTF-8?q?pc-=E7=94=A8=E6=88=B7=E7=AE=A1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=88=E4=BF=AE=E6=94=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talkonlineweb/controller/UserContoller.java | 27 +++--- .../lyms/talkonlineweb/domain/UserroleInfo.java | 106 +++++---------------- 2 files changed, 38 insertions(+), 95 deletions(-) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java index 8ed1730..0e45547 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java @@ -1,18 +1,11 @@ package com.lyms.talkonlineweb.controller; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.lyms.talkonlineweb.annotation.TokenRequired; -import com.lyms.talkonlineweb.domain.LymsAttention; -import com.lyms.talkonlineweb.domain.LymsPermission; -import com.lyms.talkonlineweb.domain.LymsUser; -import com.lyms.talkonlineweb.domain.UserroleInfo; +import com.lyms.talkonlineweb.domain.*; import com.lyms.talkonlineweb.mapper.LymsUserMapper; import com.lyms.talkonlineweb.result.BaseResponse; -import com.lyms.talkonlineweb.result.CheckResult; import com.lyms.talkonlineweb.service.LymsUserService; import com.lyms.talkonlineweb.service.LymsUserroleService; import com.lyms.talkonlineweb.service.UserroleInfoService; @@ -23,16 +16,12 @@ import io.jsonwebtoken.Claims; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.cglib.beans.BeanMap; import org.springframework.util.DigestUtils; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpSession; -import java.sql.Wrapper; import java.util.*; -import java.util.concurrent.TimeUnit; @RestController @Log4j2 @@ -210,10 +199,18 @@ public class UserContoller { * @return */ @GetMapping("sltUser") - public BaseResponse sltUser(LymsUser user,int current,int size){ +// public BaseResponse sltUser(LymsUser user,int current,int size){ +// BaseResponse baseResponse=new BaseResponse(); +// Page page=new Page<>(current,size); +// Page userIPage=lymsUserService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); +// baseResponse.setObject(userIPage); +// +// return baseResponse; +// } + public BaseResponse sltUser(UserroleInfo user, int current, int size){ BaseResponse baseResponse=new BaseResponse(); - Page page=new Page<>(current,size); - Page userIPage=lymsUserService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); + Page page=new Page<>(current,size); + Page userIPage= userroleInfoService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); baseResponse.setObject(userIPage); return baseResponse; diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/UserroleInfo.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/UserroleInfo.java index 3661c38..34da4b2 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/UserroleInfo.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/UserroleInfo.java @@ -76,6 +76,30 @@ public class UserroleInfo implements Serializable { private String dname; /** + * 电话 + */ + @TableField(value = "mobile") + private String mobile; + + /** + * 是否启用;1是,0否 + */ + @TableField(value = "enable") + private Byte enable; + + /** + * 创建人账号 + */ + @TableField(value = "creator") + private String creator; + + /** + * 个人简介 + */ + @TableField(value = "intro") + private String intro; + + /** * 创建人 */ @TableField(value = "createdby") @@ -100,7 +124,7 @@ public class UserroleInfo implements Serializable { private Date updatedTime; /** - * + * 角色id */ @TableField(value = "rid") private Integer rid; @@ -114,83 +138,5 @@ public class UserroleInfo implements Serializable { @TableField(exist = false) private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - UserroleInfo other = (UserroleInfo) that; - return (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid())) - && (this.getUname() == null ? other.getUname() == null : this.getUname().equals(other.getUname())) - && (this.getLogin() == null ? other.getLogin() == null : this.getLogin().equals(other.getLogin())) - && (this.getPasswd() == null ? other.getPasswd() == null : this.getPasswd().equals(other.getPasswd())) - && (this.getHeadimg() == null ? other.getHeadimg() == null : this.getHeadimg().equals(other.getHeadimg())) - && (this.getHxid() == null ? other.getHxid() == null : this.getHxid().equals(other.getHxid())) - && (this.getHid() == null ? other.getHid() == null : this.getHid().equals(other.getHid())) - && (this.getHname() == null ? other.getHname() == null : this.getHname().equals(other.getHname())) - && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid())) - && (this.getDname() == null ? other.getDname() == null : this.getDname().equals(other.getDname())) - && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby())) - && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime())) - && (this.getUpdatedby() == null ? other.getUpdatedby() == null : this.getUpdatedby().equals(other.getUpdatedby())) - && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) - && (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid())) - && (this.getRname() == null ? other.getRname() == null : this.getRname().equals(other.getRname())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode()); - result = prime * result + ((getUname() == null) ? 0 : getUname().hashCode()); - result = prime * result + ((getLogin() == null) ? 0 : getLogin().hashCode()); - result = prime * result + ((getPasswd() == null) ? 0 : getPasswd().hashCode()); - result = prime * result + ((getHeadimg() == null) ? 0 : getHeadimg().hashCode()); - result = prime * result + ((getHxid() == null) ? 0 : getHxid().hashCode()); - result = prime * result + ((getHid() == null) ? 0 : getHid().hashCode()); - result = prime * result + ((getHname() == null) ? 0 : getHname().hashCode()); - result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode()); - result = prime * result + ((getDname() == null) ? 0 : getDname().hashCode()); - result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode()); - result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode()); - result = prime * result + ((getUpdatedby() == null) ? 0 : getUpdatedby().hashCode()); - result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); - result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode()); - result = prime * result + ((getRname() == null) ? 0 : getRname().hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", uid=").append(uid); - sb.append(", uname=").append(uname); - sb.append(", login=").append(login); - sb.append(", passwd=").append(passwd); - sb.append(", headimg=").append(headimg); - sb.append(", hxid=").append(hxid); - sb.append(", hid=").append(hid); - sb.append(", hname=").append(hname); - sb.append(", did=").append(did); - sb.append(", dname=").append(dname); - sb.append(", createdby=").append(createdby); - sb.append(", createdtime=").append(createdtime); - sb.append(", updatedby=").append(updatedby); - sb.append(", updatedTime=").append(updatedTime); - sb.append(", rid=").append(rid); - sb.append(", rname=").append(rname); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } + } \ No newline at end of file -- 1.8.3.1