更新密码重置用户信息

pull/108/head
RuoYi 2019-07-13 18:23:28 +08:00
parent 9c927e621d
commit b757c5b7b3
1 changed files with 6 additions and 1 deletions

View File

@ -195,7 +195,12 @@ public class SysUserController extends BaseController
{ {
user.setSalt(ShiroUtils.randomSalt()); user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt())); user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
return toAjax(userService.resetUserPwd(user)); if (userService.resetUserPwd(user) > 0)
{
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
return success();
}
return error();
} }
@RequiresPermissions("system:user:remove") @RequiresPermissions("system:user:remove")