mirror of https://gitee.com/stylefeng/roses
【8.1.9】【sys】登录错误更新状态为3,临时冻结
parent
49e1e57113
commit
cc09e43f9b
|
@ -136,7 +136,7 @@ public interface SysUserServiceApi {
|
|||
UserInfoDetailDTO getUserDetail(Long userId);
|
||||
|
||||
/**
|
||||
* 锁定用户状态
|
||||
* 临时锁定用户状态,默认设定1天的自动解锁日期
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/10/3 22:11
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 登录次数
|
||||
*/
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue