WIN-2308041133\Administrator 5 months ago
parent
commit
cbbe0e4979
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/common/dao/store/product/SpuDao.php

+ 3 - 0
app/common/dao/store/product/SpuDao.php

@@ -83,6 +83,9 @@ class SpuDao extends  BaseDao
             ->when(isset($where['product_ids']) && $where['product_ids'] !== '',function($query)use($where){
             ->when(isset($where['product_ids']) && $where['product_ids'] !== '',function($query)use($where){
                 $query->whereIn('P.product_id',$where['product_ids']);
                 $query->whereIn('P.product_id',$where['product_ids']);
             })
             })
+            ->when(isset($where['type']) && $where['type'] !== '',function($query)use($where){
+                $query->whereIn('P.type',$where['type']);
+            })
 //            ->when(isset($where['type']), function($query) use($where) {
 //            ->when(isset($where['type']), function($query) use($where) {
 //                if ($where['type'] === '') {
 //                if ($where['type'] === '') {
 //                    $query->whereIn('P.type', [0,1,2,3,4]);
 //                    $query->whereIn('P.type', [0,1,2,3,4]);