From 3f049061b81d9d13f4f1344231c4273eed1a54ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Thu, 3 Aug 2023 16:56:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9middle=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../middle/systemlog/service/impl/StatisticsServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java index 581533f..6a279e0 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java @@ -109,8 +109,12 @@ public class StatisticsServiceImpl extends ServiceImpl selectPage(Page page1, StatisticsVo statistics) { - statistics.setCreateTime(statistics.getCreateTime().substring(0, 10)); - statistics.setEndTime(statistics.getEndTime().substring(0, 10)); + if (statistics.getCreateTime() != null) { + statistics.setCreateTime(statistics.getCreateTime().substring(0, 10)); + } + if (statistics.getEndTime() != null) { + statistics.setEndTime(statistics.getEndTime().substring(0, 10)); + } IPage statisticsResponseVoIPage = baseMapper.selectPages(page1, statistics); // List records = statisticsResponseVoIPage.getRecords(); // List collect = records.stream().sorted(Comparator.comparing(StatisticsResponseVo::getSort)).collect(Collectors.toList());