44323
2023-11-21 1e64ef03770f4e3a7f357049a6fe744f39c2c4b6
cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
@@ -323,7 +323,7 @@
                        // 获取到优惠券id 查询这个优惠券指定了哪些城市
                        Integer id = Integer.parseInt(String.valueOf(map.get("id")));
                        // 获取到运营商管理的省和市
                        List<TOperatorCity> cityByOperatorId = operatorClient.getCityByOperatorId(ofSearch.getOperatorId());
                        List<TOperatorCity> cityByOperatorId = ofSearch.getOperatorCities();
                        // 拿到运营商市的code集合
                        List<String> collect = cityByOperatorId.stream().filter(t -> t.getPid() != 0)
                                .map(tOperatorCity -> Integer.toString(tOperatorCity.getCode()))
@@ -397,12 +397,11 @@
    @ResponseBody
    @PostMapping("/base/coupon/queryCouponListSearch1")
    public List<Map<String,Object>> getCouponListOfSearch1(@RequestBody CouponListOfSearch ofSearch){
        // 查询全国通用的优惠券和包含指定门店的优惠券
        List<Map<String, Object>> mapList = couponService.queryCouponListOfSearch1(ofSearch);
        Date currentDate = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String currentDateStr = sdf.format(currentDate);
        // Iterate over the mapList and remove entries where endTime is less than the current date
        Iterator<Map<String, Object>> iterator = mapList.iterator();
        while (iterator.hasNext()) {