From 176bc53bfab8f9d3d56eeae7e27ebec2d8ce50df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Sun, 23 Apr 2023 09:21:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=A8=A1=E5=9D=97,=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzims/middle/systemlog/entity/SysLog.java | 4 ++++ .../middle/systemlog/service/impl/SysLogServiceImpl.java | 1 + .../java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java | 4 ++-- .../java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java | 11 ++++++----- 4 files changed, 13 insertions(+), 7 deletions(-) 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; - }