大区概念
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user