refactor: 后台用户密码更新
This commit is contained in:
parent
0ea786f6e6
commit
a2c94c06a7
@ -121,7 +121,7 @@ public class YztUtil {
|
||||
// 解密结果:中国123ABCabc
|
||||
// System.out.println(encryptPassword("Yzt_123456", "18292417675"));
|
||||
// System.out.println(decryptPassword("c7Nwx1WsDdewbab2TlkpUg==", "18292417675"));
|
||||
System.out.println(decryptPassword("ZRHx7lLKlTzrjD7fpVAVOQ==", "19924716954"));
|
||||
System.out.println(decryptPassword("u/w7KGAe2kNpl1jr+aqk1w==", "13042028174"));
|
||||
// 执行结果:f6mcpGQ8NEmwbab2TlkpUg==
|
||||
// 与 SQL 中的数据一致
|
||||
}
|
||||
|
||||
@ -1589,6 +1589,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
BeanUtils.copyProperties(userRequest, user);
|
||||
if(userRequest.getPassword().isBlank()){
|
||||
user.setPwd(tempUser.getPwd());
|
||||
}else {
|
||||
user.setPwd(YztUtil.encryptPassword(userRequest.getPassword(),tempUser.getPhone()));
|
||||
}
|
||||
// if (userRequest.getTradePassword().isBlank()){
|
||||
// user.setTradePassword(tempUser.getTradePassword());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user