6
0
Fork 0

调整领取奖品查询sql

release
vine_liutk 2022-03-22 14:45:19 +08:00
parent df8fe0991f
commit 7d3aa6881f
1 changed files with 3 additions and 1 deletions

View File

@ -412,7 +412,9 @@ class OrderService
if ($_giftsRule['times'] == 0 && OrderProduct::where([
'activity_id' => $partActivity->activity_id,
'user_id' => $order->user_id,
])->exists()) {
])->whereHas('order', function ($query) {//除取消外的订单
return $query->where('status', '<>', Order::STATUS_CANCELLED);
})->exists()) {
continue;//提前结束本次循环
}
//判断是否满足门槛