提交 f9402a90 编写于 作者: minghao.wu's avatar minghao.wu

Merge branch 'dev_SaaS20220301' into 'release'

fix: 判断用户

See merge request !93
流水线 #43235 已失败 于阶段
......@@ -251,13 +251,12 @@ public class HospitalSaasUserServiceImpl implements HospitalSaasUserService {
/** 修改密码 */
if (StringUtils.isNotEmpty(req.getPassword())) {
String mobileEncrypt = AESUtil.encryptV0(req.getMobile());
Account accountExist = accountMapper.getByMobilePhone(mobileEncrypt);
Account accountExist = accountMapper.selectById(req.getId());
if (accountExist == null) {
throw new PicaException(PicaResultCode.PARAM_IS_INVALID.code(), "当前用户不存在");
}
if (StringUtils.isEmpty(accountExist.getPassword())) {
passwordService.modifyPassword(mobileEncrypt, accountExist.getPassword(), StringUtils.upperCase(MD5Util.MD5(req.getPassword())), true);
passwordService.modifyPassword(accountExist.getMobilePhone(), accountExist.getPassword(), StringUtils.upperCase(MD5Util.MD5(req.getPassword())), true);
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册