无关风月
2025-04-16 58b9f4d4521b21f0dbd2ed717cfa35e92d02a527
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;
@@ -289,6 +290,12 @@
            System.out.println("=========coursePackagePaymentConfig=============>" + coursePackagePaymentConfig);
//        model.addAttribute("couponIds", "3,2");
        }
           Integer able  =  coursePackageClient.queryAble(id);
        model.addAttribute("able",able);
        return PREFIX + "coursePackage_edit.html";
    }
@@ -743,7 +750,7 @@
//            CityManager cityManager = cityManagerClient.queryCityManagerById(objectId);
//            cityCode = cityManager.getCityCode();
//        }
        System.out.println("======="+storeService.queryCity(code, cityCode));
//        return storeService.queryCity(code, cityCode);
        return new ResultUtil(0,null,null,storeService.queryCity(code, cityCode),null);
    }
@@ -765,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
@@ -780,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<>();
@@ -849,6 +885,37 @@
        System.out.println("==storeId==="+storeId);
        List<TSite> list = siteService.list(new QueryWrapper<TSite>().select("id","name").eq("storeId", storeId).eq("state", 1));
        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获取场地
@@ -1120,7 +1187,7 @@
    public ResultUtil editCoursePackageState1(Integer id, Integer state){
        TCoursePackage coursePackage = new TCoursePackage();
        coursePackage.setId(id);
        coursePackage.setStatus(state);
        coursePackage.setState(state);
        coursePackageService.editCoursePackageState(coursePackage);
        return ResultUtil.success();
    }