mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-06 21:45:47 +08:00
搜索,商品分类第三极没有品牌优化
This commit is contained in:
@ -176,6 +176,7 @@ class BrandService
|
||||
{
|
||||
// 根据分类获取品牌id
|
||||
$category_ids = GoodsService::GoodsCategoryItemsIds([$params['category_id']], 1);
|
||||
$category_ids[] = $params['category_id'];
|
||||
$where = ['g.is_delete_time'=>0, 'g.is_shelves'=>1, 'gci.category_id'=>$category_ids];
|
||||
$brand_where['id'] = Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->field('g.brand_id')->where($where)->group('g.brand_id')->column('brand_id');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user