feat:force change password
This commit is contained in:
parent
48922e41e0
commit
154b2ac47a
@ -63,6 +63,10 @@ public class AuthPermissionInfoRespVO {
|
||||
|
||||
@Schema(description = "用户部门拼接", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
private String deptIdColl;
|
||||
|
||||
@Schema(description = "用户部门拼接", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
private Integer isChangePwd;
|
||||
|
||||
}
|
||||
|
||||
@Schema(description = "管理后台 - 登录用户的菜单信息 Response VO")
|
||||
|
@ -120,4 +120,9 @@ public class AdminUserDO extends TenantBaseDO {
|
||||
* 云之家OpenId
|
||||
*/
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 是否修改了默认密码
|
||||
*/
|
||||
private Integer isChangePwd;
|
||||
}
|
||||
|
@ -108,6 +108,7 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
AdminUserDO user = BeanUtils.toBean(createReqVO, AdminUserDO.class);
|
||||
user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启
|
||||
user.setPassword(encodePassword(createReqVO.getPassword())); // 加密密码
|
||||
user.setIsChangePwd(CommonStatusEnum.DISABLE.getStatus());//默认密码
|
||||
userMapper.insert(user);
|
||||
// 2.2 插入关联岗位
|
||||
if (CollectionUtil.isNotEmpty(user.getPostIds())) {
|
||||
@ -182,6 +183,7 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
// 执行更新
|
||||
AdminUserDO updateObj = new AdminUserDO().setId(id);
|
||||
updateObj.setPassword(encodePassword(reqVO.getNewPassword())); // 加密密码
|
||||
updateObj.setIsChangePwd(CommonStatusEnum.ENABLE.getStatus());
|
||||
userMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@ -209,6 +211,7 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
AdminUserDO updateObj = new AdminUserDO();
|
||||
updateObj.setId(id);
|
||||
updateObj.setPassword(encodePassword(password)); // 加密密码
|
||||
updateObj.setIsChangePwd(CommonStatusEnum.DISABLE.getStatus());
|
||||
userMapper.updateById(updateObj);
|
||||
|
||||
// 3. 记录操作日志上下文
|
||||
|
Loading…
Reference in New Issue
Block a user