| | |
| | | package com.dsh.activity.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.activity.entity.Coupon; |
| | | import com.dsh.activity.entity.UserCoupon; |
| | | import com.dsh.activity.feignclient.model.CouponListOfSearch; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.request.CommodityRequest; |
| | | import com.dsh.activity.model.request.CouponPackageReq; |
| | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/coupon/queryCouponListSearch") |
| | | public List<Map<String,Object>> getCouponListOfSearch(@RequestBody CouponListOfSearch ofSearch){ |
| | | List<Map<String, Object>> mapList = couponService.queryCouponListOfSearch(ofSearch); |
| | | if (mapList.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | | Object startTime = stringObjectMap.get("startTime"); |
| | | Object endTime = stringObjectMap.get("endTime"); |
| | | stringObjectMap.put("timeValue",startTime + "至"+endTime); |
| | | int count = ucService.count(new LambdaQueryWrapper<UserCoupon>() |
| | | .eq(UserCoupon::getCouponId, o)); |
| | | stringObjectMap.put("hasPickQty",count); |
| | | } |
| | | } |
| | | return mapList; |
| | | } |
| | | |
| | | |
| | | } |