|
@@ -592,20 +592,32 @@ public class AdminCustomerController {
|
|
|
|
|
|
CustomerInfo ci = (CustomerInfo) map.get("customer");
|
|
|
if(ci != null){
|
|
|
- Province province = new Province();
|
|
|
- province.setProvinceId(Integer.valueOf(ci.getCustomerProvinceId()));
|
|
|
- List<Province> provinceList = addressService.listProvince(province);
|
|
|
- ci.setCustomerProvinceName(provinceList.get(0).getProvince());
|
|
|
-
|
|
|
- City city = new City();
|
|
|
- city.setCityId(Integer.valueOf(ci.getCustomerCityId()));
|
|
|
- List<City> cityList = addressService.listCity(city);
|
|
|
- ci.setCustomerCityName(cityList.get(0).getCity());
|
|
|
-
|
|
|
- District district = new District();
|
|
|
- district.setDistrictId(Integer.valueOf(ci.getCustomerDistrictId()));
|
|
|
- List<District> districtList = addressService.listDistrict(district);
|
|
|
- ci.setCustomerDistrictName(districtList.get(0).getDistrict());
|
|
|
+ if(ci.getCustomerProvinceId() != null){
|
|
|
+ Province province = new Province();
|
|
|
+ province.setProvinceId(Integer.valueOf(ci.getCustomerProvinceId()));
|
|
|
+ List<Province> provinceList = addressService.listProvince(province);
|
|
|
+ ci.setCustomerProvinceName(provinceList.get(0).getProvince());
|
|
|
+ }else{
|
|
|
+ ci.setCustomerProvinceName("");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ci.getCustomerCityId() != null){
|
|
|
+ City city = new City();
|
|
|
+ city.setCityId(Integer.valueOf(ci.getCustomerCityId()));
|
|
|
+ List<City> cityList = addressService.listCity(city);
|
|
|
+ ci.setCustomerCityName(cityList.get(0).getCity());
|
|
|
+ }else{
|
|
|
+ ci.setCustomerCityName("");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ci.getCustomerDistrictId() != null){
|
|
|
+ District district = new District();
|
|
|
+ district.setDistrictId(Integer.valueOf(ci.getCustomerDistrictId()));
|
|
|
+ List<District> districtList = addressService.listDistrict(district);
|
|
|
+ ci.setCustomerDistrictName(districtList.get(0).getDistrict());
|
|
|
+ }else{
|
|
|
+ ci.setCustomerDistrictName("");
|
|
|
+ }
|
|
|
}
|
|
|
rj.addResponseKeyValue("cmRelation", cmRelation);
|
|
|
rj.addResponseKeyValue("procMethod", procMethod);
|