|
|
@@ -263,8 +263,6 @@ public class KxsUserServiceImpl extends ServiceImpl<KxsUserMapper, KxsUser> impl
|
|
|
|
|
|
KxsUser user = baseMapper.selectById(userId.getValue().toString());
|
|
|
if(user != null){
|
|
|
- //修改的字段
|
|
|
- List<String> changeFieldList = dmlData.getChangeFieldList();
|
|
|
//加盐
|
|
|
String salt;
|
|
|
if(StrUtil.isNotBlank(user.getSalt())){
|
|
|
@@ -273,13 +271,13 @@ public class KxsUserServiceImpl extends ServiceImpl<KxsUserMapper, KxsUser> impl
|
|
|
salt = UUID.randomUUID().toString();
|
|
|
}
|
|
|
user.setSalt(salt);
|
|
|
- if(changeFieldList.contains("LoginPwd")){
|
|
|
+ if(loginPwd.getValue() != null && !ENCODER.matches(loginPwd.getValue() + salt, user.getPassword())){
|
|
|
//登陆密码
|
|
|
- user.setPassword(ENCODER.encode(loginPwd.getValue().toString() + salt));
|
|
|
+ user.setPassword(ENCODER.encode(loginPwd.getValue() + salt));
|
|
|
}
|
|
|
- if(changeFieldList.contains("PayPwd")){
|
|
|
+ if(payPwd.getValue() != null && !ENCODER.matches(payPwd.getValue() + salt, user.getPayPwd())){
|
|
|
//支付密码
|
|
|
- user.setPayPwd(ENCODER.encode(payPwd.getValue().toString() + salt));
|
|
|
+ user.setPayPwd(ENCODER.encode(payPwd.getValue() + salt));
|
|
|
}
|
|
|
baseMapper.updateById(user);
|
|
|
}
|