Sfoglia il codice sorgente

修改接口报错

sunxiaobiao 1 anno fa
parent
commit
55cef70493

+ 6 - 6
app/common/repositories/store/product/ProductRepository.php

@@ -1044,7 +1044,7 @@ class ProductRepository extends BaseRepository
1044 1044
                 $s = 8000;
1045 1045
             }
1046 1046
 
1047
-            $res['yanglao'] = bcmul($s, 0.035, 2);  
1047
+            $res['yanglao'] = bcmul($s, 0.035, 2);
1048 1048
         }
1049 1049
 
1050 1050
 
@@ -1337,7 +1337,7 @@ class ProductRepository extends BaseRepository
1337 1337
 //        echo Db::getlastsql();die;
1338 1338
         $list = $query->page($page, $limit)->setOption('field', [])->with(['issetCoupon'])->field('volunteer,product_id,cate_id,mer_id,image,store_name,sort,sales,price,create_time,keyword')->select();
1339 1339
         $arr=[];
1340
-        foreach ($list["list"] as $v) {
1340
+        foreach ($list as $v) {
1341 1341
             $k = $this->pvParm($v['product_id']);
1342 1342
 //            $v['yanglao'] = $yanglao;
1343 1343
 //            $v["yanglao"]
@@ -1351,7 +1351,7 @@ class ProductRepository extends BaseRepository
1351 1351
 //            array_push($v,$k);
1352 1352
             $arr[]=$v;
1353 1353
         }
1354
-        $list["list"]=$arr;
1354
+        $list=$arr;
1355 1355
         return compact('count', 'list');
1356 1356
     }
1357 1357
 
@@ -1969,7 +1969,7 @@ class ProductRepository extends BaseRepository
1969 1969
                 ->where('product_id', $product_id)
1970 1970
                 ->select()->toArray();
1971 1971
             $attrInfo = array_column($attrInfo, null, 'gong_sku_id');
1972
-            $updateData = [];   
1972
+            $updateData = [];
1973 1973
             // 组装数据
1974 1974
             foreach ($skuArr as $key => $value) {
1975 1975
                 if (isset($attrInfo[$value['sku_id']])) {
@@ -1980,7 +1980,7 @@ class ProductRepository extends BaseRepository
1980 1980
                         // $diff_profit = bcmul($diff, 0.7, 2);
1981 1981
                         $diff_profit = $diff;
1982 1982
                         $plate_mer_profit = bcadd($attrInfo[$value['sku_id']]['gong_mer_profit'], $diff_profit, 2);
1983
-                    } else {    
1983
+                    } else {
1984 1984
                         // 下调价格计算创客利润
1985 1985
                         $diff = bcsub($attrInfo[$value['sku_id']]['gong_market_price'], $value['edit_price'], 2);
1986 1986
                         $plate_mer_profit = bcsub($attrInfo[$value['sku_id']]['gong_mer_profit'], $diff, 2);
@@ -2068,7 +2068,7 @@ class ProductRepository extends BaseRepository
2068 2068
     // 供应链商品上下架
2069 2069
     public function changeStatus($ids, $is_show)
2070 2070
     {
2071
-    
2071
+
2072 2072
         if ($is_show == 1) {
2073 2073
             $data = ['is_show' => $is_show, 'is_status' => 0];
2074 2074
         } else {