This commit is contained in:
mashuai 2025-05-07 15:59:12 +08:00
parent 7d95a14b71
commit 20113e24fa
1 changed files with 1 additions and 1 deletions

View File

@ -626,7 +626,7 @@ public class SysUserServiceImpl implements ISysUserService {
throw new ServiceException("新密码不能包含超过" + systemConfig.getPasswordConfig().getMaxConsecutiveChars() + "位连续字符!"); throw new ServiceException("新密码不能包含超过" + systemConfig.getPasswordConfig().getMaxConsecutiveChars() + "位连续字符!");
} }
// 根据用户id查询用户信息 // 根据用户id查询用户信息
SysUser userInfo = userMapper.selectUserById(SecurityUtils.getUserId()); SysUser userInfo = userMapper.selectUserById(user.getUserId());
boolean isNewPassword = SecurityUtils.matchesPassword(decrypt, userInfo.getPassword()); boolean isNewPassword = SecurityUtils.matchesPassword(decrypt, userInfo.getPassword());
if (isNewPassword) { if (isNewPassword) {
throw new ServiceException("新密码不能与旧密码相同!"); throw new ServiceException("新密码不能与旧密码相同!");