|
|
|
@ -100,10 +100,11 @@ public class SysProfileController extends BaseController |
|
|
|
{ |
|
|
|
{ |
|
|
|
return error("新密码不能与旧密码相同"); |
|
|
|
return error("新密码不能与旧密码相同"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) |
|
|
|
newPassword = SecurityUtils.encryptPassword(newPassword); |
|
|
|
|
|
|
|
if (userService.resetUserPwd(userName, newPassword) > 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// 更新缓存用户密码
|
|
|
|
// 更新缓存用户密码
|
|
|
|
loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword)); |
|
|
|
loginUser.getUser().setPassword(newPassword); |
|
|
|
tokenService.setLoginUser(loginUser); |
|
|
|
tokenService.setLoginUser(loginUser); |
|
|
|
return success(); |
|
|
|
return success(); |
|
|
|
} |
|
|
|
} |
|
|
|
|