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