This commit is contained in:
wangxiaowei 2024-09-28 09:35:16 +08:00
parent 43510944f5
commit 595c0b2009

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