diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java index 0fd735d..5bb4897 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -198,6 +199,7 @@ public class SysLog implements Serializable { */ @ApiModelProperty("操作时间") @TableField("operation_time") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING) private LocalDateTime operationTime; /** @@ -212,6 +214,7 @@ public class SysLog implements Serializable { */ @ApiModelProperty("创建时间") @TableField("create_time") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING) private LocalDateTime createTime; /** @@ -219,6 +222,7 @@ public class SysLog implements Serializable { */ @ApiModelProperty("更新时间") @TableField("update_time") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING) private LocalDateTime updateTime; /** diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java index 3110c2c..6f49c9d 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java @@ -79,6 +79,7 @@ public class SysLogServiceImpl extends ServiceImpl impleme queryWrapper.lambda().eq(SysLog::getPath, path); } + //开始时间 if (ObjectUtils.isNotEmpty(createTime)) { queryWrapper.lambda().ge(SysLog::getOperationTime, createTime); diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java index e3db684..6b82c1d 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java @@ -27,7 +27,7 @@ public class StatisticsVo { * 开始时间 */ //@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING) - //@DateTimeFormat(pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") private String createTime; /** @@ -35,7 +35,7 @@ public class StatisticsVo { * */ //@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING) - //@DateTimeFormat(pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") private String endTime; } diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java index 03b2f1d..e4b6a4f 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java @@ -1,8 +1,10 @@ package com.hnac.hzims.middle.systemlog.vo; import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; import java.time.LocalDateTime; @@ -17,12 +19,10 @@ import java.time.LocalDateTime; public class SysLogVo { - @ApiModelProperty("功能模块") private String moduleName; - /** * 功能模块,操作方法,方法描述 模糊查询 */ @@ -33,13 +33,15 @@ public class SysLogVo { /** * 开始时间 */ - @ApiModelProperty("开始时间") + @ApiModelProperty(value = "开始时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; /** * 结束时间 */ - @ApiModelProperty("结束时间") + @ApiModelProperty(value = "结束时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime endTime; @@ -51,5 +53,4 @@ public class SysLogVo { private String path; - }