44323
2024-03-18 537ed054fe1d9b40b4908cf41ce8c9a6a82d0df9
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java
@@ -13,6 +13,7 @@
import com.dsh.course.feignClient.account.model.CoachSerchVO;
import com.dsh.course.feignClient.course.*;
import com.dsh.course.feignClient.course.model.*;
import com.dsh.course.feignClient.other.BallClient;
import com.dsh.course.feignClient.other.model.Site;
import com.dsh.guns.config.UserExt;
import com.dsh.guns.core.base.controller.BaseController;
@@ -740,9 +741,8 @@
    @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;
@@ -750,18 +750,9 @@
//            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
@@ -781,6 +772,14 @@
        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
@@ -796,9 +795,30 @@
    @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<>();
@@ -867,6 +887,37 @@
        return list;
    }
    /**
     * 根据门店id获取场地(智慧球场添加使用 过滤掉已经添加过的场地)
     * @param storeId
     * @return
     */
    @Autowired
    private BallClient ballClient;
    @ResponseBody
    @PostMapping("/querySite3/{id}")
    public List<Site> querySite3(@PathVariable("id") Integer storeId){
        return ballClient.getSiteList(storeId);
    }
    @ResponseBody
    @PostMapping("/querySite3/")
    public Object querySite3(){
        return new ResultUtil(0,0,null,null,null);
    }
    /**
     * 根据门店id获取场地(智慧球场编辑使用 过滤掉已经添加过的场地 包含当前的场地)
     * @param storeId
     * @return
     */
    @ResponseBody
    @PostMapping("/querySite5/{id}")
    public List<Site> querySite5(@PathVariable("id") Integer storeId){
        return ballClient.getSiteList1(storeId);
    }
    /**
     * 根据门店id获取场地
     * @param storeId
     * @return