Browse Source

上下架

shish 5 years ago
parent
commit
00d8861f4e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app-ghs/controllers/ProductController.php

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

@@ -31,6 +31,7 @@ class ProductController extends BaseController
     {
         $py = Yii::$app->request->get('py', '');
         $type = Yii::$app->request->get('type', '');
+        $delStatus = Yii::$app->request->get('delStatus', 0);
 
         //获取所有当前供应商的分类 (全部、常用)
         //根据分类组装分类下的花材信息
@@ -55,7 +56,10 @@ class ProductController extends BaseController
             }
         }
         $where['shopId'] = $shopId;
-        $where['delStatus'] = 0;
+        // delStatus = 2 表示取出上下架的花材 shish 20210713
+        if($delStatus != 2){
+            $where['delStatus'] = $delStatus;
+        }
 
         $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData);