调整次数判断
parent
4349776533
commit
641b8f9e46
|
|
@ -65,7 +65,10 @@ class SendCoupons
|
||||||
//获取活动的赠品赠送规则
|
//获取活动的赠品赠送规则
|
||||||
$_couponsRule = $partActivity->activity?->coupons_rule;
|
$_couponsRule = $partActivity->activity?->coupons_rule;
|
||||||
//判断是否首单:times=0为仅首单赠送, 1为不限
|
//判断是否首单:times=0为仅首单赠送, 1为不限
|
||||||
if ($_couponsRule['times'] == 0 && UserCoupon::where('activity_id', $partActivity->activity_id)->exists()) {
|
if ($_couponsRule['times'] == 0 && UserCoupon::where([
|
||||||
|
'activity_id' => $partActivity->activity_id,
|
||||||
|
'user_id' => $order->user_id,
|
||||||
|
])->exists()) {
|
||||||
continue;//提前结束本次循环
|
continue;//提前结束本次循环
|
||||||
}
|
}
|
||||||
//判断是否满足门槛
|
//判断是否满足门槛
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,10 @@ class OrderService
|
||||||
//获取活动的赠品赠送规则
|
//获取活动的赠品赠送规则
|
||||||
$_giftsRule = $partActivity->activity?->gifts_rule;
|
$_giftsRule = $partActivity->activity?->gifts_rule;
|
||||||
//判断是否首单:times=0为仅首单赠送, 1为不限
|
//判断是否首单:times=0为仅首单赠送, 1为不限
|
||||||
if ($_giftsRule['times'] == 0 && OrderProduct::where('activity_id', $partActivity->activity_id)->exists()) {
|
if ($_giftsRule['times'] == 0 && OrderProduct::where([
|
||||||
|
'activity_id' => $partActivity->activity_id,
|
||||||
|
'user_id' => $order->user_id,
|
||||||
|
])->exists()) {
|
||||||
continue;//提前结束本次循环
|
continue;//提前结束本次循环
|
||||||
}
|
}
|
||||||
//判断是否满足门槛
|
//判断是否满足门槛
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue