Browse Source

异常处理

yijia
v-Brocloni 3 years ago
parent
commit
bbfb3d06b3
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      application/admin/controller/unishop/Order.php

+ 4
- 1
application/admin/controller/unishop/Order.php View File

@@ -715,7 +715,10 @@ class Order extends Backend
$list = collection($order)->toArray();
$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"]);
try {
$product->where(["id" => $val['product_id']])->setInc("stock", $val["number"])->setInc("real_sales", -$val["number"]);
} catch (Exception $e) {
}
}
}



Loading…
Cancel
Save