44323
2023-10-25 e16180612c9dfe2e879f79039d4670640867331d
cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
@@ -228,7 +228,21 @@
    @ResponseBody
    @PostMapping("/base/coupon/queryCouponListSearch")
    public List<Map<String,Object>> getCouponListOfSearch(@RequestBody CouponListOfSearch ofSearch){
        List<Map<String, Object>> mapList = couponService.queryCouponListOfSearch(ofSearch);
        List<Map<String, Object>> mapList1 = couponService.queryCouponListOfSearch(ofSearch);
        List<Map<String, Object>> mapList = new ArrayList<>();
        if(ofSearch.getStoreId()!=null){
            for (Map<String, Object> map : mapList1) {
                List<CouponStore> id = couStoreService.list(new LambdaQueryWrapper<CouponStore>().eq(CouponStore::getCouponId, map.get("id").toString()));
                List<Integer> collect = id.stream().map(CouponStore::getStoreId).collect(Collectors.toList());
                if(collect.size()==0){
                    collect.add(-1);
                }
                if(collect.contains(ofSearch.getStoreId())){
                    mapList.add(map);
                }
            }
        }
        if (mapList.size() > 0){
            for (Map<String, Object> stringObjectMap : mapList) {
                Integer o = (Integer) stringObjectMap.get("id");