Browse Source

调试

yijia
v-Brocloni 3 years ago
parent
commit
7c0fbac14b
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      addons/unishop/controller/Order.php

+ 1
- 3
addons/unishop/controller/Order.php View File

@@ -244,9 +244,7 @@ class Order extends Base
$product = new \app\admin\model\unishop\Product();
foreach ($list as $val){
try {
$product->where(["id"=>$val['product_id']]);
$product->setInc("stock", $val["number"],0);
$product->setInc("real_sales",-$val["number"],0);
$product->where(["id"=>$val['product_id']])->setInc("stock", $val["number"])->setInc("real_sales",-$val["number"]);
}catch (Exception $e){
print_r($e);die;
}


Loading…
Cancel
Save