行政区划树不返回港澳台及海外数据

pull/1121/head
梁宇奇 2025-11-28 16:00:47 +08:00
parent 5d42aea349
commit 3a947f8f54
1 changed files with 6 additions and 1 deletions

View File

@ -203,7 +203,12 @@ public class ExpressServiceImpl implements IExpressService {
List<ExpressRegionTreeNodeDTO> treeNodeList = redisCache.getCacheList(Constants.EXPRESS_REGION_TREE_CACHE_KEY);
if (CollUtil.isEmpty(treeNodeList)) {
List<ExpressRegionDTO> dtoList = getRegionListCache().stream()
.filter(o -> Constants.UNDELETED.equals(o.getDelFlag()))
.filter(o -> Constants.UNDELETED.equals(o.getDelFlag())
//排除港澳台及海外
&& !StrUtil.startWith(o.getRegionCode(), "71")
&& !StrUtil.startWith(o.getRegionCode(), "81")
&& !StrUtil.startWith(o.getRegionCode(), "82")
&& !StrUtil.startWith(o.getRegionCode(), "99"))
.collect(Collectors.toList());
List<ExpressRegionTreeNodeDTO> list = BeanUtil.copyToList(dtoList, ExpressRegionTreeNodeDTO.class);
treeNodeList = CollUtil.newArrayList();