Compare commits

..

2 Commits

Author SHA1 Message Date
liang.chao ee0107384e 用户首次登录需要修改密码 2024-09-29 13:30:03 +08:00
liang.chao 5b16865ab7 用户首次登录需要修改密码 2024-09-29 13:29:36 +08:00
5 changed files with 10 additions and 6 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

@ -4,6 +4,7 @@ import java.util.List;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.system.api.domain.SysUser;
import com.bonus.sgzb.system.api.model.LoginUser;
import com.bonus.sgzb.system.domain.po.UrgentProcessingUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@ -227,5 +228,5 @@ public interface ISysUserService
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>