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 @@