shish 5 лет назад
Родитель
Сommit
382e73dcb2
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      app-hd/controllers/ProductController.php

+ 5 - 3
app-hd/controllers/ProductController.php

@@ -148,13 +148,15 @@ class ProductController extends BaseController
             $where['sjId'] = $sjId;
             $where['shopId'] = $shopId;
             $where['delStatus'] = 0;
+            $where['status'] = 1;
 
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");
             $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
             //常用的itemIds
-            $oftenItemIds = ProductClass::getOftenItemIds($shopId);
-            //获取供应商下所有花材ID (itemIds)
-            $itemIdsInfo = ProductClass::getGhsItemIds($sjId);
+            //$oftenItemIds = ProductClass::getOftenItemIds($shopId);
+            $oftenItemIds = [];
+            //获取供应商下所有上架的花材
+            $itemIdsInfo = ProductClass::getAllList('classId,itemId', ['sjId' => $sjId, 'status' => 1]);
 
             //dd($itemInfoData);
             //组装数据: [{classId:'','className:'',child:[{itemInfoData}]}]