|
|
|
@ -196,8 +196,11 @@ public class SysUserController extends BaseController
|
|
|
|
|
user.setSalt(ShiroUtils.randomSalt());
|
|
|
|
|
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
|
|
|
|
if (userService.resetUserPwd(user) > 0)
|
|
|
|
|
{
|
|
|
|
|
if (ShiroUtils.getUserId() == user.getUserId())
|
|
|
|
|
{
|
|
|
|
|
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
|
|
|
|
}
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|
return error();
|
|
|
|
|