From c1025b72685f1e52962cd7d22b9f0d8a1422cd45 Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 4 Aug 2021 09:26:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/search/serviceimpl/EsGoodsSearchServiceImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 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 2ad41f23..71e8e36a 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 @@ -104,10 +104,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { @Override public List getHotWords(Integer count) { List hotWords = new ArrayList<>(); - if (hotWords.isEmpty() || hotWords == null) { - return null; - } - //下表从0开始,所以count-1 + //下标从0开始,所以count-1 count = count - 1; Set set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count); for (DefaultTypedTuple defaultTypedTuple : set) {