优惠券详情添加已领取数量

This commit is contained in:
wuchunlei
2024-10-31 11:53:54 +08:00
parent 1e71f8280b
commit ae85ae8109

View File

@@ -110,6 +110,8 @@ public class CouponController {
public R getCouponInfo(@RequestBody Map<String,Object> params){
CouponEntity couponEntity = couponService.getByIdSetRange(Integer.parseInt(params.get("id").toString()));
couponService.setRangeList(couponEntity);
couponEntity.setGrantCount(couponHistoryService.count(new LambdaQueryWrapper<CouponHistory>()
.eq(CouponHistory::getCouponId,couponEntity.getId())));
return R.ok().put("couponEntity",couponEntity);
}