From 3c9c20e0f42aa996af3a5a5d6dfa163a125a0ac1 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Tue, 2 Jul 2024 10:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E5=88=86=E7=B1=BB=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 01059da59..806562612 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -254,10 +254,10 @@ class OrderLogic extends BaseLogic $goods_list[$k]['uid'] = $uid; $goods_list[$k]['cart_id'] = implode(',', $cartId); $goods_list[$k]['delivery_id'] = $params['store_id']; //商家id - $StoreBranchProduct = StoreBranchProduct::where('id', $v['branch_product_id'])->withTrashed()->find(); - if ($StoreBranchProduct['stock'] - $v['cart_num'] <= 0) { - Db::name('store_product_cate')->where(['cate_id' => $StoreBranchProduct['cate_id'], 'store_id' => $params['store_id']])->update(['count' => 0]); - } +// $StoreBranchProduct = StoreBranchProduct::where('id', $v['branch_product_id'])->withTrashed()->find(); +// if ($StoreBranchProduct['stock'] - $v['cart_num'] <= 0) { +// Db::name('store_product_cate')->where(['cate_id' => $StoreBranchProduct['cate_id'], 'store_id' => $params['store_id']])->update(['count' => 0]); +// } } (new StoreOrderCartInfo())->saveAll($goods_list); $where = ['is_pay' => 0];