From 44a5b9835616f0d8bc37dd35694e3ca6ec288085 Mon Sep 17 00:00:00 2001 From: kapai <282985537@qq.com> Date: Fri, 9 Oct 2020 22:26:37 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Introducing=20new=20features.=20?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6=20https://gitee.c?= =?UTF-8?q?om/log4j/pig/issues/I1XPCP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig/admin/api/dto/SysLogDTO.java | 31 +++++++++++++++++++ .../pig/admin/api/{vo => util}/TreeUtil.java | 2 +- .../pig/admin/controller/LogController.java | 6 ++-- .../pig/admin/service/SysLogService.java | 10 ++++++ .../service/impl/SysDeptServiceImpl.java | 2 +- .../admin/service/impl/SysLogServiceImpl.java | 21 +++++++++++++ .../service/impl/SysMenuServiceImpl.java | 2 +- 7 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/dto/SysLogDTO.java rename pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/{vo => util}/TreeUtil.java (98%) diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/dto/SysLogDTO.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/dto/SysLogDTO.java new file mode 100644 index 00000000..0bf75d87 --- /dev/null +++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/dto/SysLogDTO.java @@ -0,0 +1,31 @@ +package com.pig4cloud.pig.admin.api.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @author lengleng + * @date 2020/10/9 + *
+ * 日志查询传输对象
+ */
+@Data
+@ApiModel(value = "日志查询对象")
+public class SysLogDTO {
+
+ /**
+ * 查询日志类型
+ */
+ @ApiModelProperty(value = "日志类型")
+ private String type;
+
+ /**
+ * 创建时间区间 [开始时间,结束时间]
+ */
+ @ApiModelProperty(value = "创建时间区间")
+ private LocalDateTime[] createTime;
+
+}
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/vo/TreeUtil.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/util/TreeUtil.java
similarity index 98%
rename from pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/vo/TreeUtil.java
rename to pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/util/TreeUtil.java
index b389333f..3e2d052b 100644
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/vo/TreeUtil.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/util/TreeUtil.java
@@ -20,7 +20,7 @@
* @ Apache-2.0
*/
-package com.pig4cloud.pig.admin.api.vo;
+package com.pig4cloud.pig.admin.api.util;
import com.pig4cloud.pig.admin.api.dto.MenuTree;
import com.pig4cloud.pig.admin.api.dto.TreeNode;
diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java
index bffc21af..85588eb8 100644
--- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java
+++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java
@@ -15,8 +15,8 @@
*/
package com.pig4cloud.pig.admin.controller;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.pig4cloud.pig.admin.api.dto.SysLogDTO;
import com.pig4cloud.pig.admin.api.entity.SysLog;
import com.pig4cloud.pig.admin.service.SysLogService;
import com.pig4cloud.pig.common.core.util.R;
@@ -51,8 +51,8 @@ public class LogController {
* @return
*/
@GetMapping("/page")
- public R getLogPage(Page page, SysLog sysLog) {
- return R.ok(sysLogService.page(page, Wrappers.query(sysLog)));
+ public R getLogPage(Page page, SysLogDTO sysLog) {
+ return R.ok(sysLogService.getLogByPage(page, sysLog));
}
/**
diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/SysLogService.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/SysLogService.java
index 08eee0b0..a5aad234 100644
--- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/SysLogService.java
+++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/SysLogService.java
@@ -16,7 +16,9 @@
package com.pig4cloud.pig.admin.service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.pig4cloud.pig.admin.api.dto.SysLogDTO;
import com.pig4cloud.pig.admin.api.entity.SysLog;
/**
@@ -29,4 +31,12 @@ import com.pig4cloud.pig.admin.api.entity.SysLog;
*/
public interface SysLogService extends IService