fix:重置密码问题

This commit is contained in:
zhangzhiqiang
2023-01-06 13:53:39 +08:00
parent acb1d1074a
commit e05823a488
2 changed files with 6 additions and 3 deletions

View File

@@ -62,10 +62,10 @@ public class SecurityUtils {
} }
/** /**
* 获取系统用户Id * 获取系统用户部门Id
* * @return 用户部门现在1n该方法禁用
* @return 系统用户Id
*/ */
@Deprecated
public static Long getDeptId() { public static Long getDeptId() {
// return getCurrentUser().getUser().getDept().getId(); // return getCurrentUser().getUser().getDept().getId();
return 1L; return 1L;

View File

@@ -135,6 +135,9 @@ public class ISysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> imp
}catch (Exception ex){ }catch (Exception ex){
throw new RuntimeException(); throw new RuntimeException();
} }
if ("123456".equals(sysUser.getPassword())){
sysUser.setPassword(SaSecureUtil.md5BySalt("123456", "salt"));
}
sysUser.setUpdateTime(new Date()); sysUser.setUpdateTime(new Date());
sysUser.setUpdateId(SecurityUtils.getCurrentUserId()); sysUser.setUpdateId(SecurityUtils.getCurrentUserId());
this.updateById(sysUser); this.updateById(sysUser);