🔨 添加修改密码时间.
This commit is contained in:
@@ -68,9 +68,6 @@ public class SystemUserDTO implements Serializable {
|
||||
@Schema(description = "用户状态 0停用 1启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "最后登录时间")
|
||||
private Date lastLoginTime;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
|
||||
@@ -90,6 +90,10 @@ public class SystemUserDO extends BaseDO {
|
||||
@TableField("update_password_reason")
|
||||
private String updatePasswordReason;
|
||||
|
||||
@Schema(description = "修改密码时间")
|
||||
@TableField("update_password_time")
|
||||
private Date updatePasswordTime;
|
||||
|
||||
@Schema(description = "最后登录时间")
|
||||
@TableField("last_login_time")
|
||||
private Date lastLoginTime;
|
||||
|
||||
@@ -58,7 +58,7 @@ public class InfraWorkplaceStatisticsVO {
|
||||
@Schema(description = "未读消息数量")
|
||||
private Integer unreadMessageCount;
|
||||
|
||||
@Schema(description = "上次登录时间")
|
||||
@Schema(description = "最后登录时间")
|
||||
private Date lastLoginTime;
|
||||
|
||||
@Schema(description = "当前登录会话数量")
|
||||
|
||||
@@ -72,6 +72,9 @@ public class SystemUserVO implements Serializable {
|
||||
@Schema(description = "最后登录时间")
|
||||
private Date lastLoginTime;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@@ -84,9 +87,6 @@ public class SystemUserVO implements Serializable {
|
||||
@Schema(description = "修改人")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "用户角色")
|
||||
private List<SystemRoleVO> roles;
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ import org.dromara.visor.module.infra.dao.SystemUserDAO;
|
||||
import org.dromara.visor.module.infra.dao.SystemUserRoleDAO;
|
||||
import org.dromara.visor.module.infra.define.cache.TipsCacheKeyDefine;
|
||||
import org.dromara.visor.module.infra.define.cache.UserCacheKeyDefine;
|
||||
import org.dromara.visor.module.infra.define.config.AppAuthenticationConfig;
|
||||
import org.dromara.visor.module.infra.entity.domain.SystemRoleDO;
|
||||
import org.dromara.visor.module.infra.entity.domain.SystemUserDO;
|
||||
import org.dromara.visor.module.infra.entity.dto.UserInfoDTO;
|
||||
@@ -64,10 +63,7 @@ import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -81,9 +77,6 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class SystemUserServiceImpl implements SystemUserService {
|
||||
|
||||
@Resource
|
||||
private AppAuthenticationConfig appAuthenticationConfig;
|
||||
|
||||
@Resource
|
||||
private SystemUserDAO systemUserDAO;
|
||||
|
||||
@@ -322,6 +315,7 @@ public class SystemUserServiceImpl implements SystemUserService {
|
||||
update.setPassword(Signatures.md5(request.getPassword()));
|
||||
update.setUpdatePasswordStatus(UpdatePasswordStatusEnum.NO_REQUIRE.getStatus());
|
||||
update.setUpdatePasswordReason(Const.EMPTY);
|
||||
update.setUpdatePasswordTime(new Date());
|
||||
int effect = systemUserDAO.updateById(update);
|
||||
log.info("SystemUserService-resetPassword record: {}, effect: {}", JSON.toJSONString(update), effect);
|
||||
// 删除登录失败次数缓存
|
||||
@@ -329,9 +323,7 @@ public class SystemUserServiceImpl implements SystemUserService {
|
||||
// 删除登录缓存
|
||||
RedisUtils.scanKeysDelete(UserCacheKeyDefine.LOGIN_TOKEN.format(id, "*"));
|
||||
// 删除续签信息
|
||||
if (appAuthenticationConfig.getAllowRefresh()) {
|
||||
RedisUtils.scanKeysDelete(UserCacheKeyDefine.LOGIN_REFRESH.format(id, "*"));
|
||||
}
|
||||
RedisUtils.scanKeysDelete(UserCacheKeyDefine.LOGIN_REFRESH.format(id, "*"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<result column="status" property="status"/>
|
||||
<result column="update_password_status" property="updatePasswordStatus"/>
|
||||
<result column="update_password_reason" property="updatePasswordReason"/>
|
||||
<result column="update_password_time" property="updatePasswordTime"/>
|
||||
<result column="last_login_time" property="lastLoginTime"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, username, password, nickname, avatar, mobile, email, status, update_password_status, update_password_reason, last_login_time, description, create_time, update_time, creator, updater, deleted
|
||||
id, username, password, nickname, avatar, mobile, email, status, update_password_status, update_password_reason, update_password_time, last_login_time, description, create_time, update_time, creator, updater, deleted
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user