|
|
|
@ -112,6 +112,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|
|
|
|
.set(SystemUser::getUserName, userInfoReqVo.getUserName())
|
|
|
|
|
.set(SystemUser::getAccount, userInfoReqVo.getAccount())
|
|
|
|
|
.set(SystemUser::getPhoneNum, userInfoReqVo.getPhoneNum())
|
|
|
|
|
.set(StrUtil.isNotEmpty(userInfoReqVo.getPassword()),SystemUser::getUserPd, UserUtil.signPassword(userInfoReqVo.getPassword()))
|
|
|
|
|
.set(Objects.nonNull(userInfoReqVo.getStatus()),SystemUser::getStatus, userInfoReqVo.getStatus())
|
|
|
|
|
.set(SystemUser::getRemark, userInfoReqVo.getRemark())
|
|
|
|
|
.eq(SystemUser::getId, userInfoReqVo.getId())
|
|
|
|
@ -174,17 +175,17 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean changePassWord(String account, String password) {
|
|
|
|
|
Assert.notEmpty(account, "账号不能为空");
|
|
|
|
|
UserInfoDTO user = UserUtil.getUser();
|
|
|
|
|
Assert.notEmpty(password, "密码不能为空");
|
|
|
|
|
|
|
|
|
|
Long count = super.lambdaQuery().eq(SystemUser::getAccount, account).count();
|
|
|
|
|
Long count = super.lambdaQuery().eq(SystemUser::getId, user.getId()).count();
|
|
|
|
|
if (count == 0){
|
|
|
|
|
log.info("账号:{}不存在", account);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return super.lambdaUpdate().set(SystemUser::getUserPd, UserUtil.signPassword(password))
|
|
|
|
|
.eq(SystemUser::getAccount, account).update();
|
|
|
|
|
.eq(SystemUser::getId, user.getId()).update();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|