|
|
@@ -102,13 +102,13 @@ class StoreCartController
|
|
|
@file_put_contents("quanju.txt", "礼包检查: uid=$uid, is_gift=$is_gift\r\n", 8);
|
|
|
|
|
|
// 先查看符合条件的订单详情
|
|
|
- $hasOrder = $orderServices->count([
|
|
|
- ['uid'=> $uid],
|
|
|
- ['order_type'=> 1],
|
|
|
- ['paid'=> 1]
|
|
|
- ]);
|
|
|
- @file_put_contents("quanju.txt", "礼包检查: hasOrder=$hasOrder\r\n", 8);
|
|
|
- if ($hasOrder > 0) {
|
|
|
+// $hasOrder = $orderServices->count([
|
|
|
+// ['uid'=> $uid],
|
|
|
+// ['order_type'=> 1],
|
|
|
+// ['paid'=> 1]
|
|
|
+// ]);
|
|
|
+
|
|
|
+ if ($orderServices->checkGift($uid)) {
|
|
|
return app('json')->fail('礼包商品只能购买一次');
|
|
|
}
|
|
|
}
|