From bf53e2ebedf6527dbb8f8dc395570f7f7126b183 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 26 Apr 2023 15:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=9F=9Fdebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java index 2c0fc01..5500fce 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java @@ -54,6 +54,9 @@ public class RegionsCacheHelperImpl extends AbstractRegionCacheHelper implements @Override public Collection listChildRegionCodeList(String regionCode, int regionLevel) { RegionDTO currRegion = getByCodeAndLevel(regionCode, regionLevel); + if(Objects.isNull(currRegion)){ + return Collections.emptyList(); + } if (currRegion.getParentCode().equals(regionCode)) { return Collections.singletonList(regionCode); }