用户首次登录需要修改密码

This commit is contained in:
liang.chao 2024-09-29 13:29:36 +08:00
parent 8f07301082
commit 5b16865ab7
4 changed files with 8 additions and 5 deletions

View File

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

View File

@ -1,6 +1,8 @@
package com.bonus.sgzb.system.mapper;
import java.util.List;
import com.bonus.sgzb.system.api.model.LoginUser;
import org.apache.ibatis.annotations.Param;
import com.bonus.sgzb.system.api.domain.SysUser;
@ -137,5 +139,5 @@ public interface SysUserMapper
String selectforceChangePwd(String username);
void updatePwdState();
void updatePwdState(LoginUser loginUser);
}

View File

@ -582,8 +582,8 @@ public class SysUserServiceImpl implements ISysUserService {
}
@Override
public void updatePwdState() {
userMapper.updatePwdState();
public void updatePwdState(LoginUser loginUser) {
userMapper.updatePwdState(loginUser);
}

View File

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