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());