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)); } //更新商品总库存数据