|
@@ -317,13 +317,13 @@ class StoreOrder extends BaseModel
|
|
|
$totalNum = 0;
|
|
$totalNum = 0;
|
|
|
$gainIntegral = 0;
|
|
$gainIntegral = 0;
|
|
|
foreach ($cartInfo as $cart) {
|
|
foreach ($cartInfo as $cart) {
|
|
|
- $product = StoreProduct::where('id', $cart['productInfo']['id'])->find();
|
|
|
|
|
- if ($product['cate_id'] == 2){
|
|
|
|
|
- if ($cart['cart_num'] > 1) return self::setErrorInfo('限购一个', true);
|
|
|
|
|
- $orderId = StoreOrder::where('uid', $uid)->where('status', '>', 0)->column('id');
|
|
|
|
|
- $orderCart = StoreOrderCartInfo::where([['oid', 'in', $orderId], ['product_id', '=', $product['id']]])->find();
|
|
|
|
|
- if ($orderCart) return self::setErrorInfo('该礼包只能购买一次', true);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// $product = StoreProduct::where('id', $cart['productInfo']['id'])->find();
|
|
|
|
|
+// if ($product['cate_id'] == 2){
|
|
|
|
|
+// if ($cart['cart_num'] > 1) return self::setErrorInfo('限购一个', true);
|
|
|
|
|
+// $orderId = StoreOrder::where('uid', $uid)->where('status', '>', 0)->column('id');
|
|
|
|
|
+// $orderCart = StoreOrderCartInfo::where([['oid', 'in', $orderId], ['product_id', '=', $product['id']]])->find();
|
|
|
|
|
+// if ($orderCart) return self::setErrorInfo('该礼包只能购买一次', true);
|
|
|
|
|
+// }
|
|
|
$cartIds[] = $cart['id'];
|
|
$cartIds[] = $cart['id'];
|
|
|
$totalNum += $cart['cart_num'];
|
|
$totalNum += $cart['cart_num'];
|
|
|
if (!$seckill_id) $seckill_id = $cart['seckill_id'];
|
|
if (!$seckill_id) $seckill_id = $cart['seckill_id'];
|