Commit 0699ef41 by huangZW

111

parent aa7a44e5
......@@ -180,7 +180,7 @@ public class StoreController extends WebBaseController{
//获取首页销售数据
@IgnoreLogin
@RequestMapping("/get-area-list")
public HaobanResponse getArea() {
public HaobanResponse getArea(String id) {
Map<String,Object> map = new HashMap<>();
Map<String, ProvinceDTO> provinceMap = GlobalDictMap.provinceMap;
Map<String,CityDTO> cityMap = GlobalDictMap.cityMap;
......@@ -197,10 +197,19 @@ public class StoreController extends WebBaseController{
for (String key : countyMap.keySet()) {
countyList.add(countyMap.get(key));
}
map.put("province", provinceList);
map.put("city", cityList);
map.put("county", countyList);
return resultResponse(HaoBanErrCode.ERR_1,map);
if(StringUtils.isEmpty(id)){
//省
return resultResponse(HaoBanErrCode.ERR_1,provinceList);
}else{
if(cityMap.containsKey(id)){
//市
return resultResponse(HaoBanErrCode.ERR_1,cityList);
}else if(countyMap.containsKey(id)){
//区
return resultResponse(HaoBanErrCode.ERR_1,countyList);
}
}
return resultResponse(HaoBanErrCode.ERR_8);
}
//获取首页销售数据
@RequestMapping("/change-store-detail")
......
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