From 40817f2ddf2b8b7f9c77f9bf8f2f708bf950eaa7 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 22 Jun 2022 10:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E6=9D=A5=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/renren/common/controller/CensusControllerV2.java | 3 ++- renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index 2ffaf28d..e71f2384 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; +import org.apache.commons.lang3.ObjectUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -197,7 +198,7 @@ public class CensusControllerV2 { re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName()); re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum()); return re; - }).collect(Collectors.toList()); + }).filter(index -> ObjectUtils.allNotNull(index)).collect(Collectors.toList()); result.sort(Comparator.comparing(x -> { ObjectMapper mapper = new ObjectMapper(); try { diff --git a/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml b/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml index 224fca21..f1c4ffdb 100644 --- a/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml +++ b/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml @@ -11,7 +11,8 @@