From 2d18cbbf9a33fce56469cc5c5ea172f0ec16fd69 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Wed, 22 Jun 2022 18:40:11 +0800 Subject: [PATCH] npe --- .../dataResource/domain/TsingtaoDataResourceService.java | 1 - .../modules/resource/service/impl/ResourceServiceImpl.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java index f78cdb82..3b543c6d 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java @@ -9,7 +9,6 @@ import org.slf4j.LoggerFactory; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; -import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import java.nio.charset.Charset; diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 0242c0ac..16689f53 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -515,6 +515,9 @@ public class ResourceServiceImpl extends CrudServiceImpl areaMap = new HashMap<>(); areaMap.put("type", "区级"); Integer integer = resourceDao.selectTypeCountByDept("区级", jsonObject.getString("type")); + if (null == integer) { + integer = 0; + } areaMap.put("total", integer); ArrayList areaListTemp = new ArrayList<>(); areaTypeList.orElse(new HashMap<>()).forEach((key, value) -> {