修改密码

This commit is contained in:
wcy 2024-09-28 20:54:38 +08:00
parent 60a1db9b3a
commit 8f07301082
5 changed files with 16 additions and 1 deletions

View File

@ -108,6 +108,7 @@ public class SysProfileController extends BaseController {
LoginUser loginUser = SecurityUtils.getLoginUser();
loginUser.getSysUser().setPassword(SecurityUtils.encryptPassword(newDecrypt));
tokenService.setLoginUser(loginUser);
userService.updatePwdState();
return success();
}
return error("修改密码异常,请联系管理员");

View File

@ -136,4 +136,6 @@ public interface SysUserMapper
void updatePurchaseNoticePerson(SysUser user);
String selectforceChangePwd(String username);
void updatePwdState();
}

View File

@ -226,4 +226,6 @@ public interface ISysUserService
AjaxResult urgentProcessingUser(UrgentProcessingUser urgentProcessingUser);
String selectforceChangePwd(String username);
void updatePwdState();
}

View File

@ -580,4 +580,11 @@ public class SysUserServiceImpl implements ISysUserService {
public String selectforceChangePwd(String username) {
return userMapper.selectforceChangePwd(username);
}
@Override
public void updatePwdState() {
userMapper.updatePwdState();
}
}

View File

@ -256,8 +256,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updatePurchaseNoticePerson">
update purchase_notice_person set telphone = #{phonenumber} where user_id = #{userId}
</update>
<update id="updatePwdState">
update sys_user set force_change_pwd = '0'
</update>
<delete id="deleteUserById" parameterType="Long">
<delete id="deleteUserById" parameterType="Long">
update sys_user set del_flag = '2' where user_id = #{userId}
</delete>