大区概念

This commit is contained in:
苏竹红
2024-07-02 20:19:42 +08:00
parent 86dee574fc
commit 61622f4086

View File

@@ -94,10 +94,9 @@ public class RegionServiceImpl implements RegionService {
@Override
public String getBelongWarRegionName(Long regionId) {
RegionPathNameVO regionPathNameVO = this.getAllRegionName(regionId);
if(regionPathNameVO != null && StringUtils.isNotBlank(regionPathNameVO.getAllRegionName())){
String allRegionName = regionPathNameVO.getAllRegionName();
return allRegionName.substring(0,allRegionName.indexOf(Constants.M_LINE));
RegionDO regionDO = regionMapper.getByRegionId(regionId);
if(regionDO != null){
return regionDO.getName();
}
return "";
}
@@ -107,11 +106,8 @@ public class RegionServiceImpl implements RegionService {
if(CollectionUtils.isEmpty(regionIds)){
return Maps.newHashMap();
}
Map<Long, String> regionNameMap = Maps.newHashMap();
for (Long regionId : regionIds) {
regionNameMap.put(regionId, getBelongWarRegionName(regionId));
}
return regionNameMap;
List<RegionDO> regionList = regionMapper.getByIds(regionIds);
return regionList.stream().collect(Collectors.toMap(RegionDO::getId, RegionDO::getName));
}
/**