Commit 5950c773ebeff39486f9d4668a49a20896e7d645
1 parent
d17d75b099
Exists in
master
and in
1 other branch
pc-用户管列表(修改)
Showing 2 changed files with 38 additions and 95 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
View file @
5950c77
| 1 | 1 | package com.lyms.talkonlineweb.controller; |
| 2 | 2 | |
| 3 | -import com.alibaba.fastjson.JSONArray; | |
| 4 | -import com.alibaba.fastjson.JSONObject; | |
| 5 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 6 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 7 | 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 8 | -import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 9 | -import com.lyms.talkonlineweb.domain.LymsAttention; | |
| 10 | -import com.lyms.talkonlineweb.domain.LymsPermission; | |
| 11 | -import com.lyms.talkonlineweb.domain.LymsUser; | |
| 12 | -import com.lyms.talkonlineweb.domain.UserroleInfo; | |
| 6 | +import com.lyms.talkonlineweb.domain.*; | |
| 13 | 7 | import com.lyms.talkonlineweb.mapper.LymsUserMapper; |
| 14 | 8 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 15 | -import com.lyms.talkonlineweb.result.CheckResult; | |
| 16 | 9 | import com.lyms.talkonlineweb.service.LymsUserService; |
| 17 | 10 | import com.lyms.talkonlineweb.service.LymsUserroleService; |
| 18 | 11 | import com.lyms.talkonlineweb.service.UserroleInfoService; |
| 19 | 12 | |
| 20 | 13 | |
| ... | ... | @@ -23,16 +16,12 @@ |
| 23 | 16 | import lombok.extern.log4j.Log4j2; |
| 24 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 25 | 18 | import org.springframework.beans.factory.annotation.Value; |
| 26 | -import org.springframework.cglib.beans.BeanMap; | |
| 27 | 19 | import org.springframework.util.DigestUtils; |
| 28 | 20 | import org.springframework.validation.BindingResult; |
| 29 | 21 | import org.springframework.validation.annotation.Validated; |
| 30 | 22 | import org.springframework.web.bind.annotation.*; |
| 31 | 23 | |
| 32 | -import javax.servlet.http.HttpSession; | |
| 33 | -import java.sql.Wrapper; | |
| 34 | 24 | import java.util.*; |
| 35 | -import java.util.concurrent.TimeUnit; | |
| 36 | 25 | |
| 37 | 26 | @RestController |
| 38 | 27 | @Log4j2 |
| 39 | 28 | |
| ... | ... | @@ -210,10 +199,18 @@ |
| 210 | 199 | * @return |
| 211 | 200 | */ |
| 212 | 201 | @GetMapping("sltUser") |
| 213 | - public BaseResponse sltUser(LymsUser user,int current,int size){ | |
| 202 | +// public BaseResponse sltUser(LymsUser user,int current,int size){ | |
| 203 | +// BaseResponse baseResponse=new BaseResponse(); | |
| 204 | +// Page<LymsUser> page=new Page<>(current,size); | |
| 205 | +// Page<LymsUser> userIPage=lymsUserService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); | |
| 206 | +// baseResponse.setObject(userIPage); | |
| 207 | +// | |
| 208 | +// return baseResponse; | |
| 209 | +// } | |
| 210 | + public BaseResponse sltUser(UserroleInfo user, int current, int size){ | |
| 214 | 211 | BaseResponse baseResponse=new BaseResponse(); |
| 215 | - Page<LymsUser> page=new Page<>(current,size); | |
| 216 | - Page<LymsUser> userIPage=lymsUserService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); | |
| 212 | + Page<UserroleInfo> page=new Page<>(current,size); | |
| 213 | + Page<UserroleInfo> userIPage= userroleInfoService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); | |
| 217 | 214 | baseResponse.setObject(userIPage); |
| 218 | 215 | |
| 219 | 216 | return baseResponse; |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/UserroleInfo.java
View file @
5950c77
| ... | ... | @@ -76,6 +76,30 @@ |
| 76 | 76 | private String dname; |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | + * 电话 | |
| 80 | + */ | |
| 81 | + @TableField(value = "mobile") | |
| 82 | + private String mobile; | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * 是否启用;1是,0否 | |
| 86 | + */ | |
| 87 | + @TableField(value = "enable") | |
| 88 | + private Byte enable; | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 创建人账号 | |
| 92 | + */ | |
| 93 | + @TableField(value = "creator") | |
| 94 | + private String creator; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * 个人简介 | |
| 98 | + */ | |
| 99 | + @TableField(value = "intro") | |
| 100 | + private String intro; | |
| 101 | + | |
| 102 | + /** | |
| 79 | 103 | * 创建人 |
| 80 | 104 | */ |
| 81 | 105 | @TableField(value = "createdby") |
| ... | ... | @@ -100,7 +124,7 @@ |
| 100 | 124 | private Date updatedTime; |
| 101 | 125 | |
| 102 | 126 | /** |
| 103 | - * | |
| 127 | + * 角色id | |
| 104 | 128 | */ |
| 105 | 129 | @TableField(value = "rid") |
| 106 | 130 | private Integer rid; |
| 107 | 131 | |
| ... | ... | @@ -114,84 +138,6 @@ |
| 114 | 138 | @TableField(exist = false) |
| 115 | 139 | private static final long serialVersionUID = 1L; |
| 116 | 140 | |
| 117 | - @Override | |
| 118 | - public boolean equals(Object that) { | |
| 119 | - if (this == that) { | |
| 120 | - return true; | |
| 121 | - } | |
| 122 | - if (that == null) { | |
| 123 | - return false; | |
| 124 | - } | |
| 125 | - if (getClass() != that.getClass()) { | |
| 126 | - return false; | |
| 127 | - } | |
| 128 | - UserroleInfo other = (UserroleInfo) that; | |
| 129 | - return (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid())) | |
| 130 | - && (this.getUname() == null ? other.getUname() == null : this.getUname().equals(other.getUname())) | |
| 131 | - && (this.getLogin() == null ? other.getLogin() == null : this.getLogin().equals(other.getLogin())) | |
| 132 | - && (this.getPasswd() == null ? other.getPasswd() == null : this.getPasswd().equals(other.getPasswd())) | |
| 133 | - && (this.getHeadimg() == null ? other.getHeadimg() == null : this.getHeadimg().equals(other.getHeadimg())) | |
| 134 | - && (this.getHxid() == null ? other.getHxid() == null : this.getHxid().equals(other.getHxid())) | |
| 135 | - && (this.getHid() == null ? other.getHid() == null : this.getHid().equals(other.getHid())) | |
| 136 | - && (this.getHname() == null ? other.getHname() == null : this.getHname().equals(other.getHname())) | |
| 137 | - && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid())) | |
| 138 | - && (this.getDname() == null ? other.getDname() == null : this.getDname().equals(other.getDname())) | |
| 139 | - && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby())) | |
| 140 | - && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime())) | |
| 141 | - && (this.getUpdatedby() == null ? other.getUpdatedby() == null : this.getUpdatedby().equals(other.getUpdatedby())) | |
| 142 | - && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) | |
| 143 | - && (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid())) | |
| 144 | - && (this.getRname() == null ? other.getRname() == null : this.getRname().equals(other.getRname())); | |
| 145 | - } | |
| 146 | 141 | |
| 147 | - @Override | |
| 148 | - public int hashCode() { | |
| 149 | - final int prime = 31; | |
| 150 | - int result = 1; | |
| 151 | - result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode()); | |
| 152 | - result = prime * result + ((getUname() == null) ? 0 : getUname().hashCode()); | |
| 153 | - result = prime * result + ((getLogin() == null) ? 0 : getLogin().hashCode()); | |
| 154 | - result = prime * result + ((getPasswd() == null) ? 0 : getPasswd().hashCode()); | |
| 155 | - result = prime * result + ((getHeadimg() == null) ? 0 : getHeadimg().hashCode()); | |
| 156 | - result = prime * result + ((getHxid() == null) ? 0 : getHxid().hashCode()); | |
| 157 | - result = prime * result + ((getHid() == null) ? 0 : getHid().hashCode()); | |
| 158 | - result = prime * result + ((getHname() == null) ? 0 : getHname().hashCode()); | |
| 159 | - result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode()); | |
| 160 | - result = prime * result + ((getDname() == null) ? 0 : getDname().hashCode()); | |
| 161 | - result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode()); | |
| 162 | - result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode()); | |
| 163 | - result = prime * result + ((getUpdatedby() == null) ? 0 : getUpdatedby().hashCode()); | |
| 164 | - result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); | |
| 165 | - result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode()); | |
| 166 | - result = prime * result + ((getRname() == null) ? 0 : getRname().hashCode()); | |
| 167 | - return result; | |
| 168 | - } | |
| 169 | - | |
| 170 | - @Override | |
| 171 | - public String toString() { | |
| 172 | - StringBuilder sb = new StringBuilder(); | |
| 173 | - sb.append(getClass().getSimpleName()); | |
| 174 | - sb.append(" ["); | |
| 175 | - sb.append("Hash = ").append(hashCode()); | |
| 176 | - sb.append(", uid=").append(uid); | |
| 177 | - sb.append(", uname=").append(uname); | |
| 178 | - sb.append(", login=").append(login); | |
| 179 | - sb.append(", passwd=").append(passwd); | |
| 180 | - sb.append(", headimg=").append(headimg); | |
| 181 | - sb.append(", hxid=").append(hxid); | |
| 182 | - sb.append(", hid=").append(hid); | |
| 183 | - sb.append(", hname=").append(hname); | |
| 184 | - sb.append(", did=").append(did); | |
| 185 | - sb.append(", dname=").append(dname); | |
| 186 | - sb.append(", createdby=").append(createdby); | |
| 187 | - sb.append(", createdtime=").append(createdtime); | |
| 188 | - sb.append(", updatedby=").append(updatedby); | |
| 189 | - sb.append(", updatedTime=").append(updatedTime); | |
| 190 | - sb.append(", rid=").append(rid); | |
| 191 | - sb.append(", rname=").append(rname); | |
| 192 | - sb.append(", serialVersionUID=").append(serialVersionUID); | |
| 193 | - sb.append("]"); | |
| 194 | - return sb.toString(); | |
| 195 | - } | |
| 196 | 142 | } |