shish пре 3 година
родитељ
комит
869788105b
1 измењених фајлова са 2 додато и 4 уклоњено
  1. 2 4
      app-ghs/controllers/ProductController.php

+ 2 - 4
app-ghs/controllers/ProductController.php

@@ -177,6 +177,7 @@ class ProductController extends BaseController
             $level = $custom->level ?? 1;
         }
 
+        $itemInfoData = [];
         if ($requestType == 'hasStockList') {
             //有库存的花材列表
             $field = 'id,py,name,classId,itemId,price,skPrice,stock';
@@ -215,10 +216,7 @@ class ProductController extends BaseController
                 ->select($field)->asArray()->all();
             $itemInfoData = ProductClass::warningGroup($itemInfoData, $level);
         } else {
-            //通用
-            $field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell,presellDate';
-            $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
-            $itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
+            util::fail('没有数据');
         }
         $data = ProductService::assembleItemData($classInfo, $itemInfoData);
         util::success($data);