From 0bf6aab43bc319530c31f48cb5ef8ab17678ad86 Mon Sep 17 00:00:00 2001 From: misworga831 Date: Fri, 3 Feb 2023 17:54:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=95=86=E5=93=81=E6=97=A5=E5=BF=97?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=9A=84=E8=8E=B7=E5=8F=96=E8=B4=AD=E7=89=A9=E8=BD=A6=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../search/serviceimpl/EsGoodsIndexServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java index bda58afb..7c329ce8 100644 --- a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java @@ -214,15 +214,15 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements List> brandList = new ArrayList<>(); if (CollUtil.isNotEmpty(brandIds)) { - brandList = this.brandService.getBrandsMapsByCategory(brandIds, "id,name,logo"); + brandList = this.brandService.getBrandsMapsByCategory(CollUtil.distinct(brandIds), "id,name,logo"); } List> categoryList = new ArrayList<>(); - if (CollUtil.isNotEmpty(categoryList)) { - categoryList = this.categoryService.listMapsByIdsOrderByLevel(categoryPaths, "id,name"); + if (CollUtil.isNotEmpty(categoryPaths)) { + categoryList = this.categoryService.listMapsByIdsOrderByLevel(CollUtil.distinct(categoryPaths), "id,name"); } List> storeCategoryList = new ArrayList<>(); - if (CollUtil.isNotEmpty(storeCategoryList)) { - storeCategoryList = this.storeGoodsLabelService.listMapsByStoreIds(storeCategoryPaths, "id,label_name"); + if (CollUtil.isNotEmpty(storeCategoryPaths)) { + storeCategoryList = this.storeGoodsLabelService.listMapsByStoreIds(CollUtil.distinct(storeCategoryPaths), "id,label_name"); } for (GoodsSkuDTO goodsSku : skuIPage.getRecords()) {