| | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity1/{code}/{$operationId}") |
| | | public ResultUtil queryCity1(@PathVariable("code") String code, |
| | | @PathVariable("$operationId") String operationId){ |
| | | @PostMapping("/queryCity1/{code}") |
| | | public ResultUtil queryCity1(@PathVariable("code") String code){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | |
| | | // CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | // cityCode = cityManager.getCityCode(); |
| | | // } |
| | | Integer operatorId= 0; |
| | | Integer type= 0; |
| | | if (operationId.equals("平台")){ |
| | | type = 1; |
| | | operatorId = null; |
| | | }else{ |
| | | operatorId = Integer.valueOf(operationId); |
| | | type = 2; |
| | | } |
| | | |
| | | // return storeService.queryCity(code, cityCode); |
| | | return new ResultUtil(0,null,null,storeService.queryCity2(code, cityCode |
| | | ,type,operatorId),null); |
| | | return new ResultUtil(0,null,null,storeService.queryCity(code, cityCode),null); |
| | | } |
| | | |
| | | @ResponseBody |
| | |
| | | return new ResultUtil(0,null,null,null,null); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryStore1//{id}") |
| | | public ResultUtil queryCity6(){ |
| | | |
| | | return new ResultUtil(0,null,null,null,null); |
| | | } |
| | | |
| | | /** |
| | | * 根据城市code获取门店 |
| | | * @param cityCode |
| | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryStore1/{cityCode}") |
| | | public ResultUtil queryStore1(@PathVariable("cityCode") String cityCode){ |
| | | List<TStore> list = storeService.list(new QueryWrapper<TStore>().select("id","name").eq("cityCode", cityCode).eq("state", 1)); |
| | | @PostMapping("/queryStore1/{cityCode}/{$operationId}") |
| | | public ResultUtil queryStore1(@PathVariable("cityCode") String cityCode, |
| | | @PathVariable("$operationId") String operationId){ |
| | | Integer operatorId= 0; |
| | | Integer type= 0; |
| | | if (operationId.equals("平台")){ |
| | | type = 1; |
| | | operatorId = null; |
| | | }else{ |
| | | operatorId = Integer.valueOf(operationId); |
| | | type = 2; |
| | | } |
| | | QueryWrapper<TStore> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("id","name"); |
| | | wrapper.eq("cityCode", cityCode); |
| | | wrapper.eq("state", 1); |
| | | wrapper.eq("type", type); |
| | | if (type!=1){ |
| | | // 如果不是勾选的平台 是选择的运营商 那么筛选运营商id |
| | | wrapper.eq("operatorId",operatorId); |
| | | } |
| | | List<TStore> list = storeService.list( |
| | | wrapper |
| | | ); |
| | | // Map<String,Integer> map = new LinkedHashMap<>(); |
| | | List<SelectDto> selectDtos = new ArrayList<>(); |
| | | Map<String,Integer> map = new HashMap<>(); |