From 96854ca00cc9bbc782357338c4ee95ed489966c7 Mon Sep 17 00:00:00 2001 From: misworga831 Date: Fri, 3 Feb 2023 17:55:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEid=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/search/serviceimpl/EsGoodsSearchServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java index 80ed1f54c..330f17edd 100644 --- a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java @@ -120,8 +120,6 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { @Override public List getEsGoodsBySkuIds(List skuIds, PageVO pageVo) { NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder(); - NativeSearchQuery build = searchQueryBuilder.build(); - build.setIds(skuIds); if (pageVo != null) { int pageNumber = pageVo.getPageNumber() - 1; if (pageNumber < 0) { @@ -131,6 +129,8 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { //分页 searchQueryBuilder.withPageable(pageable); } + NativeSearchQuery build = searchQueryBuilder.build(); + build.setIds(skuIds); return restTemplate.multiGet(build, EsGoodsIndex.class, restTemplate.getIndexCoordinatesFor(EsGoodsIndex.class)); }