Ver código fonte

隐藏常用

shish 5 anos atrás
pai
commit
8f0fe7525f

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

@@ -59,7 +59,8 @@ class ProductController extends BaseController
         $itemInfoData = ProductClass::getAllByCondition($where, ['actualSold' => SORT_DESC, 'inTurn' => SORT_DESC], "*");
         $itemInfoData = ProductClass::getAllByCondition($where, ['actualSold' => SORT_DESC, 'inTurn' => SORT_DESC], "*");
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
         //常用的itemIds
         //常用的itemIds
-        $oftenItemIds = ProductClass::getOftenItemIds($shopId);
+        $oftenItemIds = [];
+        //$oftenItemIds = ProductClass::getOftenItemIds($shopId);
         //获取供应商下所有花材ID (itemIds)
         //获取供应商下所有花材ID (itemIds)
         $itemIdsInfo = ItemService::getGhsItemIds($this->sjId);
         $itemIdsInfo = ItemService::getGhsItemIds($this->sjId);
 
 

+ 14 - 13
biz-ghs/product/services/ProductService.php

@@ -21,10 +21,10 @@ class ProductService extends BaseService
         $allData = [];
         $allData = [];
         if($itemInfoData){
         if($itemInfoData){
             foreach ($itemInfoData as $v){
             foreach ($itemInfoData as $v){
-                if(in_array($v['itemId'],$oftenItemIds)){
-                    $v['classId'] = self::OFTEN_CLASS_ID;
-                    $oftenItemInfoData[] = $v;
-                }
+//                if(in_array($v['itemId'],$oftenItemIds)){
+//                    $v['classId'] = self::OFTEN_CLASS_ID;
+//                    $oftenItemInfoData[] = $v;
+//                }
                 $v['classId'] = self::ALL_CLASS_ID;
                 $v['classId'] = self::ALL_CLASS_ID;
             }
             }
         }
         }
@@ -45,13 +45,13 @@ class ProductService extends BaseService
             ]
             ]
         ];
         ];
         //常用
         //常用
-        $oftenData = [
-            [
-                'classId'=> self::OFTEN_CLASS_ID,
-                'className'=>'常用',
-                'child'=>$oftenItemInfoData,
-            ]
-        ];
+//        $oftenData = [
+//            [
+//                'classId'=> self::OFTEN_CLASS_ID,
+//                'className'=>'常用',
+//                'child'=>$oftenItemInfoData,
+//            ]
+//        ];
 
 
         //改价,库存预警只要常用分类 (弃用)
         //改价,库存预警只要常用分类 (弃用)
 //        if(in_array($type,['waring','change-price'])){
 //        if(in_array($type,['waring','change-price'])){
@@ -93,9 +93,10 @@ class ProductService extends BaseService
 
 
         //$data = array_merge($oftenData,$allData,$classData);
         //$data = array_merge($oftenData,$allData,$classData);
         //去除全部
         //去除全部
-        $data = array_merge($oftenData,$classData);
+        //隐藏常用
+        //$data = array_merge($oftenData,$classData);
 
 
-        return $data;
+        return $classData;
     }
     }