v-Brocloni 3 лет назад
Родитель
Сommit
668374ba34
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      addons/unishop/controller/Order.php

+ 2
- 2
addons/unishop/controller/Order.php Просмотреть файл

@@ -16,11 +16,11 @@ use addons\unishop\extend\Redis;
use addons\unishop\model\Area;
use addons\unishop\model\Config;
use addons\unishop\model\Evaluate;
use addons\unishop\model\OrderProduct;
use addons\unishop\model\Product;
use app\admin\model\unishop\Coupon as CouponModel;
use addons\unishop\model\DeliveryRule as DeliveryRuleModel;
use addons\unishop\model\OrderRefund;
use app\admin\model\unishop\OrderProduct;
use app\admin\model\unishop\OrderRefundProduct;
use think\Db;
use think\Exception;
@@ -244,7 +244,7 @@ class Order extends Base
$product = new \app\admin\model\unishop\Product();
foreach ($list as $val){
try {
$product->where(["id"=>$val['order_product_id']]);
$product->where(["id"=>$val['product_id']]);
$product->setInc("stock", $val["number"],0);
$product->setInc("real_sales",-$val["number"],0);
}catch (Exception $e){


Загрузка…
Отмена
Сохранить