From c4aed67af7889538aab4f6419f7218fe47cb48bb Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Tue, 12 Jan 2021 22:14:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90log=E3=80=91=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roses/kernel/log/db/DbLogManagerServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel-d-log/log-sdk-db/src/main/java/cn/stylefeng/roses/kernel/log/db/DbLogManagerServiceImpl.java b/kernel-d-log/log-sdk-db/src/main/java/cn/stylefeng/roses/kernel/log/db/DbLogManagerServiceImpl.java index d90a1234a..87679d3cf 100644 --- a/kernel-d-log/log-sdk-db/src/main/java/cn/stylefeng/roses/kernel/log/db/DbLogManagerServiceImpl.java +++ b/kernel-d-log/log-sdk-db/src/main/java/cn/stylefeng/roses/kernel/log/db/DbLogManagerServiceImpl.java @@ -104,7 +104,9 @@ public class DbLogManagerServiceImpl implements LogManagerApi { private void createQueryCondition(LogManagerParam logManagerParam, LambdaQueryWrapper sysLogLambdaQueryWrapper) { // 设置查询条件的起始时间和结束时间 - sysLogLambdaQueryWrapper.between(SysLog::getCreateTime, logManagerParam.getBeginDateTime(), logManagerParam.getEndDateTime()); + if (StrUtil.isNotBlank(logManagerParam.getBeginDateTime()) && StrUtil.isNotBlank(logManagerParam.getEndDateTime())) { + sysLogLambdaQueryWrapper.between(SysLog::getCreateTime, logManagerParam.getBeginDateTime(), logManagerParam.getEndDateTime()); + } // 根据日志名称查询 String name = logManagerParam.getLogName();