|
|
@@ -241,6 +241,7 @@ class Order extends Base |
|
|
|
'order_id' => $order_id |
|
|
|
])->select(); |
|
|
|
$list = collection($list)->toArray(); |
|
|
|
print_r($list);die; |
|
|
|
$product = new \app\admin\model\unishop\Product(); |
|
|
|
foreach ($list as $val){ |
|
|
|
$product->where(["id"=>$val['product_id']])->setInc("stock",$val["number"])->setInc("real_sales",-$val["number"]); |
|
|
|