| | |
| | | // 获取到优惠券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())) |
| | |
| | | @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()) { |