From e2eb792c2602ba9add5b87a6afdc97ec6103900d Mon Sep 17 00:00:00 2001 From: smallchill Date: Thu, 27 Aug 2020 19:44:57 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20=E4=BC=98=E5=8C=96log=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=88=86=E9=A1=B5=E6=8E=92=E5=BA=8F=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springblade/core/log/controller/LogApiController.java | 5 ++++- .../springblade/core/log/controller/LogErrorController.java | 5 ++++- .../springblade/core/log/controller/LogUsualController.java | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java index 9968416..162a99c 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java @@ -27,6 +27,7 @@ import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.StringPool; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -63,7 +64,9 @@ public class LogApiController { */ @GetMapping("/list") public R> list(@ApiIgnore @RequestParam Map log, Query query) { - IPage pages = logService.page(Condition.getPage(query.setDescs("create_time")), Condition.getQueryWrapper(log, LogApi.class)); + query.setAscs("create_time"); + query.setDescs(StringPool.EMPTY); + IPage pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogApi.class)); List records = pages.getRecords().stream().map(logApi -> { LogApiVo vo = BeanUtil.copy(logApi, LogApiVo.class); vo.setStrId(Func.toStr(logApi.getId())); diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java index 1c93a89..d15d59a 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java @@ -27,6 +27,7 @@ import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.StringPool; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -63,7 +64,9 @@ public class LogErrorController { */ @GetMapping("/list") public R> list(@ApiIgnore @RequestParam Map logError, Query query) { - IPage pages = errorLogService.page(Condition.getPage(query.setDescs("create_time")), Condition.getQueryWrapper(logError, LogError.class)); + query.setAscs("create_time"); + query.setDescs(StringPool.EMPTY); + IPage pages = errorLogService.page(Condition.getPage(query), Condition.getQueryWrapper(logError, LogError.class)); List records = pages.getRecords().stream().map(logApi -> { LogErrorVo vo = BeanUtil.copy(logApi, LogErrorVo.class); vo.setStrId(Func.toStr(logApi.getId())); diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java index 8895523..ba1f7f8 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java @@ -27,6 +27,7 @@ import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.StringPool; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -63,6 +64,8 @@ public class LogUsualController { */ @GetMapping("/list") public R> list(@ApiIgnore @RequestParam Map log, Query query) { + query.setAscs("create_time"); + query.setDescs(StringPool.EMPTY); IPage pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogUsual.class)); List records = pages.getRecords().stream().map(logApi -> { LogUsualVo vo = BeanUtil.copy(logApi, LogUsualVo.class);