WIN-2308041133\Administrator 6 ヶ月 前
コミット
4949e5a805
1 ファイル変更7 行追加6 行削除
  1. 7 6
      app/common/dao/store/product/SpuDao.php

+ 7 - 6
app/common/dao/store/product/SpuDao.php

@@ -87,14 +87,15 @@ class SpuDao extends  BaseDao
 //                $query->whereIn('P.type',$where['type']);
 //            })
             ->when(isset($where['type']), function($query) use($where) {
-                if ($where['type'] === '') {
-                    $query->whereIn('P.type', [0,1,2,3,4]);
-                } else {
+//                if ($where['type'] === '') {
+//                    $query->whereIn('P.type', [0,1,2,3,4]);
+//                } else {
                     $query->where('P.type', (int)$where['type']);
-                }
-            }, function($query) {
-                $query->whereIn('P.type', [0,1,2,3,4]);
+//                }
             })
+//            , function($query) {
+//                $query->whereIn('P.type', [0,1,2,3,4]);
+//            })
             ->when(isset($where['keyword']) && $where['keyword'] !== '',function($query)use($where){
                 if (is_numeric($where['keyword'])) {
                     $query->whereLike("S.store_name|S.keyword|S.product_id", "%{$where['keyword']}%");