无关风月
2 天以前 ac3e9a7f0b21fb630049f9e191bd760eefd21467
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
@@ -221,18 +221,27 @@
    @RequestMapping("/siteDetailsOfSearch")
    @ResponseBody
    public Object siteDetailsOfSearch(String provinceId,String cityId,Integer operatorId,String storeName){
        List<Map<String, Object>> res = new ArrayList<>();
        Integer storeId = null;
        if (UserExt.getUser().getObjectType()== 2){
            // 筛选这个运营商下的门店
            operatorId = UserExt.getUser().getObjectId();
        }
        if (UserExt.getUser().getObjectType()== 3){
            List<Integer> storeIds = storeService.lambdaQuery().eq(TStore::getOperatorId, operatorId).list()
                    .stream().map(TStore::getId).collect(Collectors.toList());
            if (storeIds.isEmpty()){
                storeIds.add(0);
            }
            res = storeService.querySiteListOfpageOperator(provinceId,cityId,operatorId,storeName,storeIds);
        }else if (UserExt.getUser().getObjectType()== 3){
            // 筛选这个运营商下的门店
            storeId = UserExt.getUser().getObjectId();
            res = storeService.querySiteListOfpage(provinceId,cityId,operatorId,storeName,storeId);
        }else{
            List<Integer> storeIds = new ArrayList<>();
            res = storeService.querySiteListOfpageOperator(provinceId,cityId,operatorId,storeName,storeIds);
        }
        List<Map<String,Object>> storeList = storeService.querySiteListOfpage(provinceId,cityId,operatorId,storeName,storeId);
        if (storeList.size() > 0 ){
            for (Map<String, Object> stringObjectMap : storeList) {
        if (res.size() > 0 ){
            for (Map<String, Object> stringObjectMap : res) {
                String provinceName = (String) stringObjectMap.get("province");
                String cityName = (String) stringObjectMap.get("city");
                stringObjectMap.put("provinceCity",provinceName+cityName);
@@ -255,7 +264,7 @@
            }
        }
        return storeList;
        return res;
    }
    /**
@@ -294,9 +303,21 @@
        return couponListOfSearch;
    }
    /**
     * 根据运营商ID 获取运营商管理的省市
     */
    @RequestMapping(value = "/listSelect")
    @ResponseBody
    public Object listOfDatas(String name, Integer type, Integer status, Integer state) {
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        CouponListOfSearch ofSearch = new CouponListOfSearch();
        ofSearch.setPage(page);
        ofSearch.setName(name);
        ofSearch.setType(type);
        ofSearch.setStatus(status);
        ofSearch.setState(state);
        List<Map<String, Object>> couponListOfSearch = client.getCouponListAllOfSearch(ofSearch);
        return couponListOfSearch;
    }
    /**
     * 获取 优惠券管理