From 595c0b200979b278261e9d3198c192318728b7d2 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sat, 28 Sep 2024 09:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/command/OrderClose.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/command/OrderClose.php b/app/common/command/OrderClose.php index a0ee9432..6e013f8c 100755 --- a/app/common/command/OrderClose.php +++ b/app/common/command/OrderClose.php @@ -65,8 +65,10 @@ class OrderClose extends Command } foreach ($order['orderGoods'] as $order_goods) { + trace('type= ' . $order['order_type']); if($order['order_type'] == 4){ - GroupbuyGoods::where(['item_id' => $order_goods['item_id']])->inc('stock', 1)->update(); + $res = GroupbuyGoods::where(['item_id' => $order_goods['item_id']])->inc('stock', $order_goods['goods_num'])->update(); + trace('type= ' . json_encode($res)); } //更新商品总库存数据