Commit ad2be169604a427458213c0a0ef6be6800e0a80f
1 parent
2876ce5353
Exists in
master
and in
1 other branch
修改密码加密
Showing 1 changed file with 5 additions and 0 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
View file @
ad2be16
| ... | ... | @@ -133,7 +133,12 @@ |
| 133 | 133 | user.setCreatedtime(new Date()); |
| 134 | 134 | if(user.getUid()==null){ |
| 135 | 135 | user.setPasswd(DigestUtils.md5DigestAsHex("123456".getBytes())); |
| 136 | + }else{ | |
| 137 | + if(user.getPasswd()!=null){ | |
| 138 | + user.setPasswd(DigestUtils.md5DigestAsHex(user.getPasswd().getBytes())); | |
| 139 | + } | |
| 136 | 140 | } |
| 141 | + | |
| 137 | 142 | |
| 138 | 143 | if(result.hasErrors()){ |
| 139 | 144 | result.getAllErrors().forEach(e->{ |