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) {