手机号找回密码时,密码不更新的问题

手机号在数据库中是以国密加密的形式存储,所以匹配的时候也需要加上国密算法。

Signed-off-by: suvue <suvuemail@163.com>
pull/204/head
suvue 2024-04-08 09:56:29 +00:00 committed by Gitee
parent 3131ffa409
commit 3805aead41
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -507,7 +507,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
// 执行校验验证码
validValidCode(sysUserFindPwdByPhoneParam.getPhone(), sysUserFindPwdByPhoneParam.getValidCode(), sysUserFindPwdByPhoneParam.getValidCodeReqNo());
this.update(new LambdaUpdateWrapper<SysUser>().eq(SysUser::getPhone,
sysUserFindPwdByPhoneParam.getPhone()).set(SysUser::getPassword,
CommonCryptogramUtil.doSm4CbcEncrypt(sysUserFindPwdByPhoneParam.getPhone())).set(SysUser::getPassword,
CommonCryptogramUtil.doHashValue(CommonCryptogramUtil.doSm2Decrypt(sysUserFindPwdByPhoneParam.getNewPassword()))));
}