Browse Source

调试

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

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

@@ -241,10 +241,9 @@ 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"]);
$product->where(["id"=>$val['order_product_id']])->setInc("stock",$val["number"])->setInc("real_sales",-$val["number"]);
}

if ($order['status'] == \addons\unishop\model\Order::STATUS_NORMAL && $order['have_paid'] == \addons\unishop\model\Order::PAID_NO) {


Loading…
Cancel
Save