From d11d22ea34da69cab79e33e1969382fc32556303 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Fri, 18 Jan 2019 14:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=EF=BC=8C=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=AC=AC=E4=B8=89=E6=9E=81=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=93=81=E7=89=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/BrandService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/service/BrandService.php b/application/service/BrandService.php index 239fa5ea3..c8034c0f2 100755 --- a/application/service/BrandService.php +++ b/application/service/BrandService.php @@ -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'); }