Commit a9b8d5f0a6674b6e736d610d7b12bd226ce71739

Authored by fengliang
1 parent a4366834

update:地址处理修复

etrade-order/src/main/java/com/diligrp/etrade/order/service/impl/BaseRegionServiceImpl.java
@@ -82,29 +82,15 @@ public class BaseRegionServiceImpl implements BaseRegionService { @@ -82,29 +82,15 @@ public class BaseRegionServiceImpl implements BaseRegionService {
82 streetList.add(street); 82 streetList.add(street);
83 lastBaseRegion = baseRegion; 83 lastBaseRegion = baseRegion;
84 } 84 }
85 - if(baseDistrict!=null){  
86 - baseDistrict.setChildren(streetList);  
87 -  
88 - }else{  
89 - baseDistrict = new BaseRegionNextVo(lastBaseRegion.getDistrictId(), lastBaseRegion.getDistrictName(),3);  
90 - baseDistrict.setChildren(streetList);  
91 - } 85 + baseDistrict = new BaseRegionNextVo(lastBaseRegion.getDistrictId(), lastBaseRegion.getDistrictName(),3);
  86 + baseDistrict.setChildren(streetList);
92 districtsMap.put(baseDistrict.getId(),baseDistrict); 87 districtsMap.put(baseDistrict.getId(),baseDistrict);
93 - if(baseCity!=null){  
94 - baseCity.setChildren(new ArrayList<>(districtsMap.values()));  
95 - }else{  
96 - baseCity = new BaseRegionNextVo(lastBaseRegion.getCityId(), lastBaseRegion.getCityName(),2);  
97 - baseCity.setChildren(new ArrayList<>(districtsMap.values()));  
98 - } 88 + baseCity = new BaseRegionNextVo(lastBaseRegion.getCityId(), lastBaseRegion.getCityName(),2);
  89 + baseCity.setChildren(new ArrayList<>(districtsMap.values()));
99 citiesMap.put(baseCity.getId(),baseCity); 90 citiesMap.put(baseCity.getId(),baseCity);
100 - if(baseProvince!=null){  
101 - baseProvince.setChildren(new ArrayList<>(citiesMap.values()));  
102 - }else{  
103 - baseProvince = new BaseRegionNextVo(lastBaseRegion.getProvinceId(), lastBaseRegion.getProvinceName(),1);  
104 - baseProvince.setChildren(new ArrayList<>(citiesMap.values()));  
105 - } 91 + baseProvince = new BaseRegionNextVo(lastBaseRegion.getProvinceId(), lastBaseRegion.getProvinceName(),1);
  92 + baseProvince.setChildren(new ArrayList<>(citiesMap.values()));
106 provinces.add(baseProvince); 93 provinces.add(baseProvince);
107 -  
108 return provinces; 94 return provinces;
109 } 95 }
110 96