浏览代码

调试

yijia
v-Brocloni 3 年前
父节点
当前提交
e8436d5022
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      addons/unishop/controller/Order.php

+ 2
- 1
addons/unishop/controller/Order.php 查看文件

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


正在加载...
取消
保存