|
@@ -254,10 +254,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
validEntityBeforeUpdate(update);
|
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
UserUpdateAddBo userUpdateAddBo = new UserUpdateAddBo();
|
|
|
+ Boolean isUpdateInfo = false;
|
|
|
UserVo oldUser = queryById(bo.getUserId());
|
|
|
if (!StringUtils.isBlank(update.getRealname())){
|
|
|
- userUpdateAddBo.setUserId(bo.getUserId());
|
|
|
- userUpdateAddBo.setRealname(update.getRealname());
|
|
|
+ if(!oldUser.getRealname().equals(update.getRealname())){
|
|
|
+ userUpdateAddBo.setUserId(bo.getUserId());
|
|
|
+ userUpdateAddBo.setRealname(update.getRealname());
|
|
|
+ isUpdateInfo = true;
|
|
|
+ }
|
|
|
}
|
|
|
if (!StringUtils.isBlank(update.getTelphone())){
|
|
|
//手机号变更
|
|
@@ -269,6 +273,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
}
|
|
|
userUpdateAddBo.setUserId(bo.getUserId());
|
|
|
userUpdateAddBo.setTelphone(update.getTelphone());
|
|
|
+ isUpdateInfo = true;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -281,9 +286,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
}
|
|
|
userUpdateAddBo.setUserId(bo.getUserId());
|
|
|
userUpdateAddBo.setIdCard(update.getIdCard());
|
|
|
+ isUpdateInfo = true;
|
|
|
}
|
|
|
}
|
|
|
- if (userUpdateAddBo != null) {
|
|
|
+ if (isUpdateInfo) {
|
|
|
userUpdateService.insertByAddBo(userUpdateAddBo);
|
|
|
}
|
|
|
return this.updateById(update);
|