判断用户是否参与了抢购商品的活动
This commit is contained in:
parent
3867fd19fb
commit
e729e758ac
@ -120,7 +120,7 @@ class OrderLogic extends Logic
|
||||
Db::startTrans();
|
||||
try {
|
||||
if ($post['order_type'] == 4) {
|
||||
$in_activity = Order::where(['user_id' => $userId, 'order_type' => 4])->where('order_status', '<', 4)->find();
|
||||
$in_activity = Order::where(['user_id' => $post['user_id'], 'order_type' => 4])->where('order_status', '<', 4)->find();
|
||||
if ($in_activity) {
|
||||
throw new Exception('每位用户只能限抢一件商品');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user