Commit 0be4fe4ad64558ccb769d7c77b6134c061124b4c

Authored by zhangrui
1 parent f206130453

bug fix

Showing 1 changed file with 5 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java View file @ 0be4fe4
... ... @@ -68,9 +68,9 @@
68 68 private static final String LYMS = "龙源美生";
69 69  
70 70 private static final String ADMIN="管理员";
  71 + private static final String replacePwd = "[$#&/]-+";
71 72  
72 73  
73   -
74 74 /**
75 75 * 获取管理员列表
76 76 */
... ... @@ -193,7 +193,7 @@
193 193 user.setDepartmentses(departmentsService.getDepartments(user.getDeptId()));
194 194  
195 195 // user.setPwd(StringUtils.isEmpty(user.getPwd())?user.getPwd():user.getPwd().replaceAll(".","*"));
196   - user.setPwd("******");
  196 + user.setPwd(replacePwd);
197 197 }
198 198  
199 199 FrontEndResult frontEndResult = new FrontEndResult();
... ... @@ -801,7 +801,7 @@
801 801 if(null!=users.getOtherAccount()&&"1".equals(user.getOtherAccount()+"")){
802 802 return;
803 803 }
804   - if(password.matches("^\\**$")) {
  804 + if(StringUtils.isNotBlank(password) && password.equals(replacePwd)) {
805 805 password = users.getPwd();
806 806 }
807 807  
... ... @@ -866,6 +866,7 @@
866 866 users.setPhone(phone);
867 867 users.setAccount(account);
868 868 users.setLogincenterId(loginContext.getId());
  869 + users.setPwd(StringUtils.isNotBlank(password) ? MD5Utils.md5(password).toUpperCase() : null);
869 870 } else {
870 871 ResultUtils.buildResultAndWrite(response, ErrorCodeConstants.SYSTEM_ERROR, loginContext.getErrormsg());
871 872 return;
... ... @@ -873,8 +874,7 @@
873 874 }
874 875 }
875 876  
876   - users.setPwd(MD5Utils.md5(password).toUpperCase());
877   - users.setPhone(phone);
  877 +
878 878 users.setName(name);
879 879 users.setEnable(enable);
880 880 users.setRemarks(remarks);