Commit 7a7bd91c by huangZW

111

parent e030d109
......@@ -185,10 +185,16 @@ public class StoreController extends WebBaseController{
if (type == null) {
return resultResponse(HaoBanErrCode.ERR_2);
}
List<ProvinceDTO> provinceList=new ArrayList<ProvinceDTO>();
List<CityDTO> cityList=new ArrayList<CityDTO>();
List<CountyDTO>countyList=new ArrayList<CountyDTO>();
switch (type) {
// 省
case 1:
return resultResponse(HaoBanErrCode.ERR_1, GlobalDictMap.provinceMap);
for (String key : GlobalDictMap.provinceMap.keySet()) {
provinceList.add(GlobalDictMap.provinceMap.get(key));
}
return resultResponse(HaoBanErrCode.ERR_1, provinceList);
// 市
case 2:
Map<String, CityDTO> tabCityMap = GlobalDictMap.cityMap;
......@@ -199,7 +205,10 @@ public class StoreController extends WebBaseController{
cityMap.put(entry.getKey(), entry.getValue());
}
}
return resultResponse(HaoBanErrCode.ERR_1, cityMap);
for (String key : cityMap.keySet()) {
cityList.add(cityMap.get(key));
}
return resultResponse(HaoBanErrCode.ERR_1, cityList);
case 3:
Map<String, CountyDTO> tabCountyMap = GlobalDictMap.countyMap;
Map<String, CountyDTO> countyMap = new HashMap<String, CountyDTO>();
......@@ -209,7 +218,10 @@ public class StoreController extends WebBaseController{
countyMap.put(entry.getKey(), entry.getValue());
}
}
return resultResponse(HaoBanErrCode.ERR_1, countyMap);
for (String key : countyMap.keySet()) {
countyList.add(countyMap.get(key));
}
return resultResponse(HaoBanErrCode.ERR_1, countyList);
}
return resultResponse(HaoBanErrCode.ERR_8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment