Browse Source

日志模块,修复bug

zhongwei
段飞宇 2 years ago
parent
commit
176bc53bfa
  1. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java
  2. 1
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java
  3. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java
  4. 11
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java

4
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 java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -198,6 +199,7 @@ public class SysLog implements Serializable {
*/ */
@ApiModelProperty("操作时间") @ApiModelProperty("操作时间")
@TableField("operation_time") @TableField("operation_time")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING)
private LocalDateTime operationTime; private LocalDateTime operationTime;
/** /**
@ -212,6 +214,7 @@ public class SysLog implements Serializable {
*/ */
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
@TableField("create_time") @TableField("create_time")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING)
private LocalDateTime createTime; private LocalDateTime createTime;
/** /**
@ -219,6 +222,7 @@ public class SysLog implements Serializable {
*/ */
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@TableField("update_time") @TableField("update_time")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING)
private LocalDateTime updateTime; private LocalDateTime updateTime;
/** /**

1
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<SysLogMapper, SysLog> impleme
queryWrapper.lambda().eq(SysLog::getPath, path); queryWrapper.lambda().eq(SysLog::getPath, path);
} }
//开始时间 //开始时间
if (ObjectUtils.isNotEmpty(createTime)) { if (ObjectUtils.isNotEmpty(createTime)) {
queryWrapper.lambda().ge(SysLog::getOperationTime, createTime); queryWrapper.lambda().ge(SysLog::getOperationTime, createTime);

4
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) //@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING)
//@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private String createTime; private String createTime;
/** /**
@ -35,7 +35,7 @@ public class StatisticsVo {
* *
*/ */
//@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING) //@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING)
//@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private String endTime; private String endTime;
} }

11
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; package com.hnac.hzims.middle.systemlog.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -17,12 +19,10 @@ import java.time.LocalDateTime;
public class SysLogVo { public class SysLogVo {
@ApiModelProperty("功能模块") @ApiModelProperty("功能模块")
private String moduleName; private String moduleName;
/** /**
* 功能模块操作方法方法描述 模糊查询 * 功能模块操作方法方法描述 模糊查询
*/ */
@ -33,13 +33,15 @@ public class SysLogVo {
/** /**
* 开始时间 * 开始时间
*/ */
@ApiModelProperty("开始时间") @ApiModelProperty(value = "开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime; private LocalDateTime createTime;
/** /**
* 结束时间 * 结束时间
*/ */
@ApiModelProperty("结束时间") @ApiModelProperty(value = "结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime; private LocalDateTime endTime;
@ -51,5 +53,4 @@ public class SysLogVo {
private String path; private String path;
} }

Loading…
Cancel
Save