diff --git a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/entity/SmsLogEntity.java b/maku-boot-module/maku-module-message/src/main/java/net/maku/message/entity/SmsLogEntity.java index e7ddc64..df5fdab 100644 --- a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/entity/SmsLogEntity.java +++ b/maku-boot-module/maku-module-message/src/main/java/net/maku/message/entity/SmsLogEntity.java @@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; +import java.time.LocalDateTime; /** * 短信日志 @@ -16,49 +16,49 @@ import java.util.Date; * MAKU */ @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) @TableName("sms_log") public class SmsLogEntity { - /** - * id - */ - @TableId - private Long id; + /** + * id + */ + @TableId + private Long id; - /** - * 平台ID - */ - private Long platformId; + /** + * 平台ID + */ + private Long platformId; - /** - * 平台类型 - */ - private Integer platform; + /** + * 平台类型 + */ + private Integer platform; - /** - * 手机号 - */ - private String mobile; + /** + * 手机号 + */ + private String mobile; - /** - * 状态 0:失败 1:成功 - */ - private Integer status; + /** + * 状态 0:失败 1:成功 + */ + private Integer status; - /** - * 参数 - */ - private String params; + /** + * 参数 + */ + private String params; - /** - * 异常信息 - */ - private String error; + /** + * 异常信息 + */ + private String error; - /** - * 创建时间 - */ - @TableField(fill = FieldFill.INSERT) - private Date createTime; + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsLogVO.java b/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsLogVO.java index 09fc84a..43ab2e1 100644 --- a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsLogVO.java +++ b/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsLogVO.java @@ -6,41 +6,41 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** -* 短信日志 -* -* @author 阿沐 babamu@126.com -*/ + * 短信日志 + * + * @author 阿沐 babamu@126.com + */ @Data @Schema(description = "短信日志") public class SmsLogVO implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Schema(description = "id") - private Long id; + @Schema(description = "id") + private Long id; - @Schema(description = "平台ID") - private Long platformId; + @Schema(description = "平台ID") + private Long platformId; - @Schema(description = "平台类型") - private Integer platform; + @Schema(description = "平台类型") + private Integer platform; - @Schema(description = "手机号") - private String mobile; + @Schema(description = "手机号") + private String mobile; - @Schema(description = "状态 0:失败 1:成功") - private Integer status; + @Schema(description = "状态 0:失败 1:成功") + private Integer status; - @Schema(description = "参数") - private String params; + @Schema(description = "参数") + private String params; - @Schema(description = "异常信息") - private String error; + @Schema(description = "异常信息") + private String error; - @Schema(description = "创建时间") - @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + @Schema(description = "创建时间") + @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsPlatformVO.java b/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsPlatformVO.java index b9e9396..e192ed2 100644 --- a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsPlatformVO.java +++ b/maku-boot-module/maku-module-message/src/main/java/net/maku/message/vo/SmsPlatformVO.java @@ -6,7 +6,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 短信平台 @@ -51,6 +51,6 @@ public class SmsPlatformVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobEntity.java b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobEntity.java index 4d2e690..c853fb4 100644 --- a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobEntity.java +++ b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobEntity.java @@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 定时任务 @@ -15,95 +15,95 @@ import java.util.Date; @Data @TableName("schedule_job") public class ScheduleJobEntity implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /** - * id - */ - @TableId - private Long id; + /** + * id + */ + @TableId + private Long id; - /** - * 任务名称 - */ - private String jobName; + /** + * 任务名称 + */ + private String jobName; - /** - * 任务组名 - */ - private String jobGroup; + /** + * 任务组名 + */ + private String jobGroup; - /** - * bean名称 - */ - private String beanName; + /** + * bean名称 + */ + private String beanName; - /** - * 执行方法 - */ - private String method; + /** + * 执行方法 + */ + private String method; - /** - * 方法参数 - */ - private String params; + /** + * 方法参数 + */ + private String params; - /** - * cron表达式 - */ - private String cronExpression; + /** + * cron表达式 + */ + private String cronExpression; - /** - * 状态 - */ - private Integer status; + /** + * 状态 + */ + private Integer status; - /** - * 是否并发 0:禁止 1:允许 - */ - private Integer concurrent; + /** + * 是否并发 0:禁止 1:允许 + */ + private Integer concurrent; - /** - * 备注 - */ - private String remark; + /** + * 备注 + */ + private String remark; - /** - * 创建者 - */ - @TableField(fill = FieldFill.INSERT) - private Long creator; + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT) + private Long creator; - /** - * 创建时间 - */ - @TableField(fill = FieldFill.INSERT) - private Date createTime; + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createTime; - /** - * 更新者 - */ - @TableField(fill = FieldFill.INSERT_UPDATE) - private Long updater; + /** + * 更新者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updater; - /** - * 更新时间 - */ - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date updateTime; + /** + * 更新时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private LocalDateTime updateTime; - /** - * 版本号 - */ - @Version - @TableField(fill = FieldFill.INSERT) - private Integer version; + /** + * 版本号 + */ + @Version + @TableField(fill = FieldFill.INSERT) + private Integer version; - /** - * 删除标记 - */ - @TableLogic - @TableField(fill = FieldFill.INSERT) - private Integer deleted; + /** + * 删除标记 + */ + @TableLogic + @TableField(fill = FieldFill.INSERT) + private Integer deleted; } \ No newline at end of file diff --git a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobLogEntity.java b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobLogEntity.java index d747d7a..0483b86 100644 --- a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobLogEntity.java +++ b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/entity/ScheduleJobLogEntity.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * 定时任务日志 @@ -17,61 +17,61 @@ import java.util.Date; @Data @TableName("schedule_job_log") public class ScheduleJobLogEntity { - /** - * id - */ - @TableId - private Long id; + /** + * id + */ + @TableId + private Long id; - /** - * 任务id - */ - private Long jobId; + /** + * 任务id + */ + private Long jobId; - /** - * 任务名称 - */ - private String jobName; + /** + * 任务名称 + */ + private String jobName; - /** - * 任务组名 - */ - private String jobGroup; + /** + * 任务组名 + */ + private String jobGroup; - /** - * spring bean名称 - */ - private String beanName; + /** + * spring bean名称 + */ + private String beanName; - /** - * 执行方法 - */ - private String method; + /** + * 执行方法 + */ + private String method; - /** - * 参数 - */ - private String params; + /** + * 参数 + */ + private String params; - /** - * 任务状态 - */ - private Integer status; + /** + * 任务状态 + */ + private Integer status; - /** - * 异常信息 - */ - private String error; + /** + * 异常信息 + */ + private String error; - /** - * 耗时(单位:毫秒) - */ - private Long times; + /** + * 耗时(单位:毫秒) + */ + private Long times; - /** - * 创建时间 - */ - @TableField(fill = FieldFill.INSERT) - private Date createTime; + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/utils/AbstractScheduleJob.java b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/utils/AbstractScheduleJob.java index 5d54566..6dcee8f 100644 --- a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/utils/AbstractScheduleJob.java +++ b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/utils/AbstractScheduleJob.java @@ -13,6 +13,7 @@ import org.quartz.JobExecutionContext; import org.springframework.beans.BeanUtils; import java.lang.reflect.Method; +import java.time.LocalDateTime; import java.util.Date; @Slf4j @@ -66,7 +67,7 @@ public abstract class AbstractScheduleJob implements Job { log.setMethod(scheduleJob.getMethod()); log.setParams(scheduleJob.getParams()); log.setTimes(times); - log.setCreateTime(new Date()); + log.setCreateTime(LocalDateTime.now()); if (e != null) { log.setStatus(ScheduleStatusEnum.PAUSE.getValue()); diff --git a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobLogVO.java b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobLogVO.java index 2701248..d4b05ab 100644 --- a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobLogVO.java +++ b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobLogVO.java @@ -6,50 +6,50 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** -* 定时任务日志 -* -* @author 阿沐 babamu@126.com -*/ + * 定时任务日志 + * + * @author 阿沐 babamu@126.com + */ @Data @Schema(description = "定时任务日志") public class ScheduleJobLogVO implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Schema(description = "id") - private Long id; + @Schema(description = "id") + private Long id; - @Schema(description = "任务id") - private Long jobId; + @Schema(description = "任务id") + private Long jobId; - @Schema(description = "任务名称") - private String jobName; + @Schema(description = "任务名称") + private String jobName; - @Schema(description = "任务组名") - private String jobGroup; + @Schema(description = "任务组名") + private String jobGroup; - @Schema(description = "spring bean名称") - private String beanName; + @Schema(description = "spring bean名称") + private String beanName; - @Schema(description = "执行方法") - private String method; + @Schema(description = "执行方法") + private String method; - @Schema(description = "参数") - private String params; + @Schema(description = "参数") + private String params; - @Schema(description = "任务状态") - private Integer status; + @Schema(description = "任务状态") + private Integer status; - @Schema(description = "异常信息") - private String error; + @Schema(description = "异常信息") + private String error; - @Schema(description = "耗时(单位:毫秒)") - private Integer times; + @Schema(description = "耗时(单位:毫秒)") + private Integer times; - @Schema(description = "创建时间") - @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + @Schema(description = "创建时间") + @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobVO.java b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobVO.java index fea3674..f0e56ec 100644 --- a/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobVO.java +++ b/maku-boot-module/maku-module-quartz/src/main/java/net/maku/quartz/vo/ScheduleJobVO.java @@ -6,50 +6,50 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** -* 定时任务 -* -* @author 阿沐 babamu@126.com -*/ + * 定时任务 + * + * @author 阿沐 babamu@126.com + */ @Data @Schema(description = "定时任务") public class ScheduleJobVO implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Schema(description = "id") - private Long id; + @Schema(description = "id") + private Long id; - @Schema(description = "任务名称") - private String jobName; + @Schema(description = "任务名称") + private String jobName; - @Schema(description = "任务组名") - private String jobGroup; + @Schema(description = "任务组名") + private String jobGroup; - @Schema(description = "bean名称") - private String beanName; + @Schema(description = "bean名称") + private String beanName; - @Schema(description = "执行方法") - private String method; + @Schema(description = "执行方法") + private String method; - @Schema(description = "参数") - private String params; + @Schema(description = "参数") + private String params; - @Schema(description = "cron表达式") - private String cronExpression; + @Schema(description = "cron表达式") + private String cronExpression; - @Schema(description = "状态 ") - private Integer status; + @Schema(description = "状态 ") + private Integer status; - @Schema(description = "是否并发") - private Integer concurrent; + @Schema(description = "是否并发") + private Integer concurrent; - @Schema(description = "备注") - private String remark; + @Schema(description = "备注") + private String remark; - @Schema(description = "创建时间") - @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + @Schema(description = "创建时间") + @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/dao/SysUserTokenDao.java b/maku-boot-system/src/main/java/net/maku/system/dao/SysUserTokenDao.java index 773d699..63a5d48 100644 --- a/maku-boot-system/src/main/java/net/maku/system/dao/SysUserTokenDao.java +++ b/maku-boot-system/src/main/java/net/maku/system/dao/SysUserTokenDao.java @@ -5,7 +5,7 @@ import net.maku.system.entity.SysUserTokenEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.Date; +import java.time.LocalDateTime; import java.util.List; /** @@ -23,7 +23,7 @@ public interface SysUserTokenDao extends BaseDao { * @param time 当前时间 * @return 返回 access_token 列表 */ - List getOnlineAccessTokenListByRoleId(@Param("roleId") Long roleId, @Param("time") Date time); + List getOnlineAccessTokenListByRoleId(@Param("roleId") Long roleId, @Param("time") LocalDateTime time); /** * 根据用户ID,查询在线用户 access_token 列表 @@ -32,6 +32,6 @@ public interface SysUserTokenDao extends BaseDao { * @param time 当前时间 * @return 返回 access_token 列表 */ - List getOnlineAccessTokenListByUserId(@Param("userId") Long userId, @Param("time") Date time); + List getOnlineAccessTokenListByUserId(@Param("userId") Long userId, @Param("time") LocalDateTime time); } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/entity/SysLogLoginEntity.java b/maku-boot-system/src/main/java/net/maku/system/entity/SysLogLoginEntity.java index e602673..c7223de 100644 --- a/maku-boot-system/src/main/java/net/maku/system/entity/SysLogLoginEntity.java +++ b/maku-boot-system/src/main/java/net/maku/system/entity/SysLogLoginEntity.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * 登录日志 @@ -57,8 +57,8 @@ public class SysLogLoginEntity { * 创建时间 */ @TableField(fill = FieldFill.INSERT) - private Date createTime; - + private LocalDateTime createTime; + /** * 租户ID */ diff --git a/maku-boot-system/src/main/java/net/maku/system/entity/SysLogOperateEntity.java b/maku-boot-system/src/main/java/net/maku/system/entity/SysLogOperateEntity.java index 446bc9b..037cb14 100644 --- a/maku-boot-system/src/main/java/net/maku/system/entity/SysLogOperateEntity.java +++ b/maku-boot-system/src/main/java/net/maku/system/entity/SysLogOperateEntity.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * 操作日志 @@ -98,7 +98,7 @@ public class SysLogOperateEntity { * 创建时间 */ @TableField(fill = FieldFill.INSERT) - private Date createTime; + private LocalDateTime createTime; /** * 租户ID diff --git a/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginConfigEntity.java b/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginConfigEntity.java index c4325ef..573eda9 100644 --- a/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginConfigEntity.java +++ b/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginConfigEntity.java @@ -3,7 +3,7 @@ package net.maku.system.entity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * 第三方登录配置 @@ -68,6 +68,6 @@ public class SysThirdLoginConfigEntity { * 创建时间 */ @TableField(fill = FieldFill.INSERT) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginEntity.java b/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginEntity.java index 6912fa3..174a949 100644 --- a/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginEntity.java +++ b/maku-boot-system/src/main/java/net/maku/system/entity/SysThirdLoginEntity.java @@ -3,7 +3,7 @@ package net.maku.system.entity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * 第三方登录 @@ -64,6 +64,6 @@ public class SysThirdLoginEntity { * 创建时间 */ @TableField(fill = FieldFill.INSERT) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/entity/SysUserTokenEntity.java b/maku-boot-system/src/main/java/net/maku/system/entity/SysUserTokenEntity.java index 8ab7332..906b544 100644 --- a/maku-boot-system/src/main/java/net/maku/system/entity/SysUserTokenEntity.java +++ b/maku-boot-system/src/main/java/net/maku/system/entity/SysUserTokenEntity.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * 用户Token @@ -35,7 +35,7 @@ public class SysUserTokenEntity { /** * accessToken 过期时间 */ - private Date accessTokenExpire; + private LocalDateTime accessTokenExpire; /** * refreshToken @@ -45,7 +45,7 @@ public class SysUserTokenEntity { /** * refreshToken 过期时间 */ - private Date refreshTokenExpire; + private LocalDateTime refreshTokenExpire; /** * 租户ID @@ -56,6 +56,6 @@ public class SysUserTokenEntity { * 创建时间 */ @TableField(fill = FieldFill.INSERT) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/service/impl/SysUserTokenServiceImpl.java b/maku-boot-system/src/main/java/net/maku/system/service/impl/SysUserTokenServiceImpl.java index b15fc51..baa6d17 100644 --- a/maku-boot-system/src/main/java/net/maku/system/service/impl/SysUserTokenServiceImpl.java +++ b/maku-boot-system/src/main/java/net/maku/system/service/impl/SysUserTokenServiceImpl.java @@ -23,6 +23,7 @@ import net.maku.system.vo.SysUserTokenVO; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; import java.util.Date; import java.util.List; @@ -52,8 +53,8 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl().eq(SysUserTokenEntity::getUserId, userId)); @@ -85,7 +86,7 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl().eq(SysUserTokenEntity::getUserId, userId)); } @@ -114,7 +116,7 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl accessTokenList = baseMapper.getOnlineAccessTokenListByRoleId(roleId, new Date()); + List accessTokenList = baseMapper.getOnlineAccessTokenListByRoleId(roleId, LocalDateTime.now()); accessTokenList.forEach(this::updateCacheAuth); } @@ -123,7 +125,7 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl accessTokenList = baseMapper.getOnlineAccessTokenListByUserId(userId, new Date()); + List accessTokenList = baseMapper.getOnlineAccessTokenListByUserId(userId, LocalDateTime.now()); accessTokenList.forEach(this::updateCacheAuth); } diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/AccessTokenVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/AccessTokenVO.java index 3c3f027..6a1a0af 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/AccessTokenVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/AccessTokenVO.java @@ -8,7 +8,7 @@ import net.maku.framework.common.utils.DateUtils; import java.io.Serial; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * AccessToken @@ -28,6 +28,6 @@ public class AccessTokenVO implements Serializable { @Schema(description = "access_token 过期时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date accessTokenExpire; + private LocalDateTime accessTokenExpire; } diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysAttachmentVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysAttachmentVO.java index bb60bd6..ed2af9e 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysAttachmentVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysAttachmentVO.java @@ -6,7 +6,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 附件管理 @@ -36,6 +36,6 @@ public class SysAttachmentVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysDictDataVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysDictDataVO.java index 0cf45a4..5639977 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysDictDataVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysDictDataVO.java @@ -9,7 +9,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 字典数据 @@ -48,9 +48,9 @@ public class SysDictDataVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; @Schema(description = "更新时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date updateTime; + private LocalDateTime updateTime; } diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysDictTypeVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysDictTypeVO.java index 0fffc32..51f5b89 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysDictTypeVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysDictTypeVO.java @@ -8,7 +8,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 字典类型 @@ -41,11 +41,11 @@ public class SysDictTypeVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; @Schema(description = "更新时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date updateTime; + private LocalDateTime updateTime; @Schema(description = "来源 0:字典数据 1:动态SQL") private Integer dictSource; diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysLogLoginVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysLogLoginVO.java index 03d0e6a..86adc23 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysLogLoginVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysLogLoginVO.java @@ -12,7 +12,7 @@ import net.maku.framework.common.excel.DateConverter; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 登录日志 @@ -64,6 +64,6 @@ public class SysLogLoginVO implements Serializable, TransPojo { @ExcelProperty(value = "创建时间", converter = DateConverter.class) @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysLogOperateVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysLogOperateVO.java index c261f30..604f405 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysLogOperateVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysLogOperateVO.java @@ -6,7 +6,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 操作日志 @@ -66,6 +66,6 @@ public class SysLogOperateVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysMenuVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysMenuVO.java index 1dd9bc6..e10004e 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysMenuVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysMenuVO.java @@ -10,7 +10,7 @@ import net.maku.framework.common.utils.DateUtils; import net.maku.framework.common.utils.TreeNode; import org.hibernate.validator.constraints.Range; -import java.util.Date; +import java.time.LocalDateTime; /** * 菜单管理 @@ -50,7 +50,7 @@ public class SysMenuVO extends TreeNode { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; @Schema(description = "上级菜单名称") private String parentName; diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysOrgVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysOrgVO.java index 5ca5125..f34eaf4 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysOrgVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysOrgVO.java @@ -9,7 +9,7 @@ import lombok.EqualsAndHashCode; import net.maku.framework.common.utils.DateUtils; import net.maku.framework.common.utils.TreeNode; -import java.util.Date; +import java.time.LocalDateTime; /** * 机构列表 @@ -35,7 +35,7 @@ public class SysOrgVO extends TreeNode { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; @Schema(description = "上级名称") private String parentName; diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysParamsVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysParamsVO.java index 57dc3a9..ce0388d 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysParamsVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysParamsVO.java @@ -6,7 +6,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 参数管理 @@ -48,14 +48,14 @@ public class SysParamsVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; @Schema(description = "更新者") private Long updater; @Schema(description = "更新时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date updateTime; + private LocalDateTime updateTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysPostVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysPostVO.java index 4e831b2..00bb9c5 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysPostVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysPostVO.java @@ -9,7 +9,7 @@ import net.maku.framework.common.utils.DateUtils; import org.hibernate.validator.constraints.Range; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 岗位管理 @@ -43,6 +43,6 @@ public class SysPostVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysRoleVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysRoleVO.java index fdcb893..b9f5569 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysRoleVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysRoleVO.java @@ -7,7 +7,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; import java.util.List; /** @@ -27,7 +27,7 @@ public class SysRoleVO implements Serializable { @Schema(description = "角色名称") @NotBlank(message = "角色名称不能为空") private String name; - + @Schema(description = "角色编码") @NotBlank(message = "角色编码不能为空") private String roleCode; @@ -46,6 +46,6 @@ public class SysRoleVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginConfigVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginConfigVO.java index ee498ad..5427cac 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginConfigVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginConfigVO.java @@ -6,7 +6,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 第三方登录配置 @@ -39,7 +39,7 @@ public class SysThirdLoginConfigVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginVO.java index 65150fe..3dc78fb 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysThirdLoginVO.java @@ -6,7 +6,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 第三方登录 @@ -39,5 +39,5 @@ public class SysThirdLoginVO implements Serializable { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } \ No newline at end of file diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysUserExcelVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysUserExcelVO.java index 8f659c1..a67e6df 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysUserExcelVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysUserExcelVO.java @@ -9,7 +9,7 @@ import lombok.Data; import net.maku.framework.common.excel.DateConverter; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * excel用户表 @@ -64,6 +64,6 @@ public class SysUserExcelVO implements Serializable, TransPojo { private String superAdminLabel; @ExcelProperty(value = "创建时间", converter = DateConverter.class) - private Date createTime; + private LocalDateTime createTime; } diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysUserTokenVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysUserTokenVO.java index a312c7d..5db88b9 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysUserTokenVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysUserTokenVO.java @@ -8,7 +8,7 @@ import lombok.Data; import net.maku.framework.common.utils.DateUtils; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; /** * 用户Token @@ -32,9 +32,9 @@ public class SysUserTokenVO implements Serializable { @Schema(description = "access_token 过期时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date accessTokenExpire; + private LocalDateTime accessTokenExpire; @Schema(description = "refresh_token 过期时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date refreshTokenExpire; + private LocalDateTime refreshTokenExpire; } diff --git a/maku-boot-system/src/main/java/net/maku/system/vo/SysUserVO.java b/maku-boot-system/src/main/java/net/maku/system/vo/SysUserVO.java index 43fec91..e1163a0 100644 --- a/maku-boot-system/src/main/java/net/maku/system/vo/SysUserVO.java +++ b/maku-boot-system/src/main/java/net/maku/system/vo/SysUserVO.java @@ -15,7 +15,7 @@ import net.maku.system.entity.SysOrgEntity; import org.hibernate.validator.constraints.Range; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDateTime; import java.util.List; /** @@ -85,5 +85,5 @@ public class SysUserVO implements Serializable, TransPojo { @Schema(description = "创建时间") @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN) - private Date createTime; + private LocalDateTime createTime; } diff --git a/maku-framework/src/main/java/net/maku/framework/mybatis/entity/BaseEntity.java b/maku-framework/src/main/java/net/maku/framework/mybatis/entity/BaseEntity.java index e47345d..e63ed33 100644 --- a/maku-framework/src/main/java/net/maku/framework/mybatis/entity/BaseEntity.java +++ b/maku-framework/src/main/java/net/maku/framework/mybatis/entity/BaseEntity.java @@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.*; import com.fhs.core.trans.vo.TransPojo; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * Entity基类 @@ -24,25 +24,25 @@ public abstract class BaseEntity implements TransPojo { * 创建者 */ @TableField(fill = FieldFill.INSERT) - private Long creator; + private Long creator; /** * 创建时间 */ @TableField(fill = FieldFill.INSERT) - private Date createTime; + private LocalDateTime createTime; /** * 更新者 */ @TableField(fill = FieldFill.INSERT_UPDATE) - private Long updater; + private Long updater; /** * 更新时间 */ @TableField(fill = FieldFill.INSERT_UPDATE) - private Date updateTime; + private LocalDateTime updateTime; /** * 版本号 diff --git a/maku-framework/src/main/java/net/maku/framework/mybatis/handler/FieldMetaObjectHandler.java b/maku-framework/src/main/java/net/maku/framework/mybatis/handler/FieldMetaObjectHandler.java index 5f9ff55..61fd8ad 100644 --- a/maku-framework/src/main/java/net/maku/framework/mybatis/handler/FieldMetaObjectHandler.java +++ b/maku-framework/src/main/java/net/maku/framework/mybatis/handler/FieldMetaObjectHandler.java @@ -5,7 +5,7 @@ import net.maku.framework.security.user.SecurityUser; import net.maku.framework.security.user.UserDetail; import org.apache.ibatis.reflection.MetaObject; -import java.util.Date; +import java.time.LocalDateTime; /** * mybatis-plus 自动填充字段 @@ -25,7 +25,7 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { @Override public void insertFill(MetaObject metaObject) { UserDetail user = SecurityUser.getUser(); - Date date = new Date(); + LocalDateTime now = LocalDateTime.now(); // 用户字段填充 if (user != null) { @@ -38,9 +38,9 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { } // 创建时间 - setFieldValByName(CREATE_TIME, date, metaObject); + setFieldValByName(CREATE_TIME, now, metaObject); // 更新时间 - setFieldValByName(UPDATE_TIME, date, metaObject); + setFieldValByName(UPDATE_TIME, now, metaObject); // 版本号 setFieldValByName(VERSION, 0, metaObject); // 删除标识 @@ -52,6 +52,6 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { // 更新者 setFieldValByName(UPDATER, SecurityUser.getUserId(), metaObject); // 更新时间 - setFieldValByName(UPDATE_TIME, new Date(), metaObject); + setFieldValByName(UPDATE_TIME, LocalDateTime.now(), metaObject); } } \ No newline at end of file diff --git a/maku-framework/src/main/java/net/maku/framework/security/user/UserDetail.java b/maku-framework/src/main/java/net/maku/framework/security/user/UserDetail.java index 5a90eb1..596603e 100644 --- a/maku-framework/src/main/java/net/maku/framework/security/user/UserDetail.java +++ b/maku-framework/src/main/java/net/maku/framework/security/user/UserDetail.java @@ -6,8 +6,8 @@ import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; +import java.time.LocalDateTime; import java.util.Collection; -import java.util.Date; import java.util.List; import java.util.Set; import java.util.stream.Collectors; @@ -34,7 +34,7 @@ public class UserDetail implements UserDetails { private Integer status; private Integer superAdmin; private Long tenantId; - private Date createTime; + private LocalDateTime createTime; /** * 数据权限范围 diff --git a/maku-server/src/test/java/net/maku/EasyExcelTest.java b/maku-server/src/test/java/net/maku/EasyExcelTest.java index 7fd1934..a7107c3 100644 --- a/maku-server/src/test/java/net/maku/EasyExcelTest.java +++ b/maku-server/src/test/java/net/maku/EasyExcelTest.java @@ -8,8 +8,8 @@ import net.maku.framework.common.utils.ExcelUtils; import org.junit.jupiter.api.Test; import java.io.File; +import java.time.LocalDateTime; import java.util.Arrays; -import java.util.Date; import java.util.List; /** @@ -26,7 +26,7 @@ public class EasyExcelTest { excelClass.setNumber(1); excelClass.setDecimals(1.2); excelClass.setString("test"); - excelClass.setDate(new Date()); + excelClass.setDate(LocalDateTime.now()); List data = Arrays.asList(excelClass, excelClass, excelClass); if (file.exists()) { ExcelUtils.excelExport(ExcelClass.class, file, data); @@ -43,7 +43,7 @@ public class EasyExcelTest { excelClass.setNumber(1); excelClass.setDecimals(1.2); excelClass.setString("test"); - excelClass.setDate(new Date()); + excelClass.setDate(LocalDateTime.now()); List data = Arrays.asList(excelClass, excelClass, excelClass, excelClass, excelClass, excelClass, excelClass); if (file.exists()) { ExcelUtils.excelExport(ExcelClass.class, file, data); @@ -65,7 +65,7 @@ public class EasyExcelTest { private Double decimals; @ExcelProperty(value = "日期", converter = DateConverter.class) - private Date date; + private LocalDateTime date; } }