【8.1.9】【sys】登录错误更新状态为3,临时冻结

dev-8.1.9
stylefeng 2024-07-12 14:14:16 +08:00
parent 49e1e57113
commit cc09e43f9b
3 changed files with 12 additions and 2 deletions

View File

@ -136,7 +136,7 @@ public interface SysUserServiceApi {
UserInfoDetailDTO getUserDetail(Long userId);
/**
*
* 1
*
* @author fengshuonan
* @since 2023/10/3 22:11

View File

@ -132,6 +132,13 @@ public class SysUser extends BaseExpandFieldEntity implements GetSortKey {
@EnumFieldFormat(processEnum = UserStatusEnum.class)
private Integer statusFlag;
/**
*
*/
@TableField("freeze_deadline_time")
@ChineseDescription("冻结截止时间")
private Date freezeDeadlineTime;
/**
*
*/

View File

@ -3,6 +3,8 @@ package cn.stylefeng.roses.kernel.sys.modular.user.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.stylefeng.roses.kernel.auth.api.TenantCodeGetApi;
@ -689,7 +691,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
TenantIdHolder.set(tenantId);
LambdaUpdateWrapper<SysUser> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
lambdaUpdateWrapper.eq(SysUser::getAccount, account);
lambdaUpdateWrapper.set(SysUser::getStatusFlag, UserStatusEnum.DISABLE.getKey());
lambdaUpdateWrapper.set(SysUser::getStatusFlag, UserStatusEnum.TEMP_FREEZE.getKey());
lambdaUpdateWrapper.set(SysUser::getFreezeDeadlineTime, DateUtil.offset(new Date(), DateField.DAY_OF_MONTH, 1));
this.update(lambdaUpdateWrapper);
} finally {
TenantIdHolder.remove();