diff --git a/app/common/dao/store/product/SpuDao.php b/app/common/dao/store/product/SpuDao.php index 46237a44..ce492e2e 100644 --- a/app/common/dao/store/product/SpuDao.php +++ b/app/common/dao/store/product/SpuDao.php @@ -56,13 +56,13 @@ class SpuDao extends BaseDao $query->where('P.product_id','in',$where['product_id']); }) ->when(isset($where['mer_id']) && $where['mer_id'] !== '',function($query)use($where){ - $query->where('P.mer_id',$where['mer_id']); + // $query->where('P.mer_id',$where['mer_id']); }) ->when(isset($where['mer_array_id']),function($query)use($where){ $query->whereIn('P.mer_id',$where['mer_array_id']); }) ->when(isset($where['mer_ids']) && $where['mer_ids'] !== '',function($query)use($where){ - $query->whereIn('P.mer_id',$where['mer_ids']); + // $query->whereIn('P.mer_id',$where['mer_ids']); }) ->when(isset($where['keyword']) && $where['keyword'] !== '',function($query)use($where){ $query->whereLike("S.store_name|S.keyword|S.product_id", "%{$where['keyword']}%"); diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 937a2a86..0fba362a 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -1023,6 +1023,7 @@ class ProductRepository extends BaseRepository public function getApiSearch($merId, array $where, int $page, int $limit, $userInfo) { $where = array_merge($where, $this->dao->productShow()); + halt($where); //搜索记录 if (isset($where['keyword']) && !empty($where['keyword'])) app()->make(UserVisitRepository::class)->searchProduct( diff --git a/app/common/repositories/store/product/SpuRepository.php b/app/common/repositories/store/product/SpuRepository.php index 9e572b08..9f43b880 100644 --- a/app/common/repositories/store/product/SpuRepository.php +++ b/app/common/repositories/store/product/SpuRepository.php @@ -144,7 +144,7 @@ class SpuRepository extends BaseRepository } $where = array_merge(Product::searchEnable(), $where); $query = $this->dao->search($where); - + $query->with([ 'merchant' => function ($query) { $query->field($this->merchantFiled)->with(['type_name']); @@ -154,7 +154,6 @@ class SpuRepository extends BaseRepository ]); $productMake = app()->make(ProductRepository::class); $count = $query->count(); - $list = $query->page($page, $limit)->setOption('field', [])->field($this->productFiled)->select(); $append = ['stop_time','svip_price','show_svip_info','is_svip_price']; if ($productMake->getUserIsPromoter($userInfo))