|
|
@ -443,6 +443,12 @@ class CouponRecService implements CouponRecServiceInterface |
|
|
if($couponInventory < $oneReceiveNumber){ |
|
|
if($couponInventory < $oneReceiveNumber){ |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$couponReceiveExists = CouponRec::query()->where(['id'=>$cp->id,'user_id'=>$userId])->exists(); |
|
|
|
|
|
|
|
|
|
|
|
if($couponReceiveExists){ |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
$cr = new CouponRec; |
|
|
$cr = new CouponRec; |
|
|
$cr->user_id = $userId; |
|
|
$cr->user_id = $userId; |
|
|
$cr->coupon_id = $cp->id; |
|
|
$cr->coupon_id = $cp->id; |
|
|
|