解决没有关键词显示错误
This commit is contained in:
parent
3a2d4e6c91
commit
60cf5c92dd
@ -104,6 +104,9 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
|
|||||||
@Override
|
@Override
|
||||||
public List<String> getHotWords(Integer count) {
|
public List<String> getHotWords(Integer count) {
|
||||||
List<String> hotWords = new ArrayList<>();
|
List<String> hotWords = new ArrayList<>();
|
||||||
|
if (hotWords.isEmpty() || hotWords == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
//下表从0开始,所以count-1
|
//下表从0开始,所以count-1
|
||||||
count = count - 1;
|
count = count - 1;
|
||||||
Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count);
|
Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user