|
|
@@ -481,7 +481,7 @@ class StoreOrder extends BaseModel
|
|
|
//生成门店订单信息
|
|
|
self::createOrderPart($orderInfo); //拆单创建门店订单表
|
|
|
$res5 = true;
|
|
|
- @file_put_contents('quanju.txt', "-报错点1\r\n", 8);
|
|
|
+// @file_put_contents('quanju.txt', "-报错点1\r\n", 8);
|
|
|
|
|
|
foreach ($cartInfo as $cart) {
|
|
|
//减库存加销量
|
|
|
@@ -490,23 +490,23 @@ class StoreOrder extends BaseModel
|
|
|
else if ($bargain_id) $res5 = $res5 && StoreBargain::decBargainStock($cart['cart_num'], $bargain_id, isset($cart['productInfo']['attrInfo']) ? $cart['productInfo']['attrInfo']['unique'] : '');
|
|
|
else $res5 = $res5 && StoreProduct::decProductStock($cart['cart_num'], $cart['productInfo']['id'], isset($cart['productInfo']['attrInfo']) ? $cart['productInfo']['attrInfo']['unique'] : '');
|
|
|
}
|
|
|
- @file_put_contents('quanju.txt', "-报错点2\r\n", 8);
|
|
|
+// @file_put_contents('quanju.txt', "-报错点2\r\n", 8);
|
|
|
|
|
|
//保存购物车商品信息
|
|
|
$res4 = false !== StoreOrderCartInfo::setCartInfo($order['id'], $cartInfo);
|
|
|
- @file_put_contents('quanju.txt', "-报错点3\r\n", 8);
|
|
|
+// @file_put_contents('quanju.txt', "-报错点3\r\n", 8);
|
|
|
|
|
|
//购物车状态修改
|
|
|
$res6 = false !== StoreCart::where('id', 'IN', $cartIds)->update(['is_pay' => 1]);
|
|
|
if (!$res4 || !$res5 || !$res6) return self::setErrorInfo('订单生成失败!', true);
|
|
|
- @file_put_contents('quanju.txt', "-报错点4\r\n", 8);
|
|
|
+// @file_put_contents('quanju.txt', "-报错点4\r\n", 8);
|
|
|
|
|
|
//自动设置默认地址
|
|
|
UserRepository::storeProductOrderCreateEbApi($order, compact('cartInfo', 'addressId'));
|
|
|
- @file_put_contents('quanju.txt', "-报错点5\r\n", 8);
|
|
|
+// @file_put_contents('quanju.txt', "-报错点5\r\n", 8);
|
|
|
|
|
|
self::clearCacheOrderInfo($uid, $key);
|
|
|
- @file_put_contents('quanju.txt', "-报错点6\r\n", 8);
|
|
|
+// @file_put_contents('quanju.txt', "-报错点6\r\n", 8);
|
|
|
|
|
|
self::commitTrans();
|
|
|
StoreOrderStatus::status($order['id'], 'cache_key_create_order', '订单生成');
|
|
|
@@ -540,7 +540,7 @@ class StoreOrder extends BaseModel
|
|
|
return $item;
|
|
|
})
|
|
|
->toArray();
|
|
|
- @file_put_contents('quanju.txt', "-测试2\r\n", 8);
|
|
|
+// @file_put_contents('quanju.txt', "-测试2\r\n", 8);
|
|
|
|
|
|
$grouped = array_column($cartInfo, 'ids', 'mer_id');
|
|
|
foreach ($cartInfo as $k => $v) {
|