| | |
| | | if (list.size() > 0 ){ |
| | | storeIds = list.stream().map(CouponStore::getStoreId).collect(Collectors.toList()); |
| | | } |
| | | if(storeIds.size()==0){ |
| | | storeIds.add(-1); |
| | | } |
| | | return storeIds; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/userCoupon/queryCounts") |
| | | public Integer queryCounts(@RequestBody List<Integer> queryIds){ |
| | | return userCouponService.count(new QueryWrapper<UserCoupon>().eq("couponId",queryIds.get(0))); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/userCoupon/queryCounts1") |
| | | public Integer queryCounts1(@RequestBody List<Integer> queryIds){ |
| | | return userCouponService.count(new QueryWrapper<UserCoupon>().eq("couponId",queryIds.get(0)).eq("userId",queryIds.get(1))); |
| | | |
| | | |
| | | } |
| | | |
| | | } |