注释补充

This commit is contained in:
Chopper 2021-08-04 09:47:15 +08:00
parent dbe0821ecf
commit 5ee25262aa

View File

@ -104,6 +104,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
@Override
public List<String> getHotWords(Integer count) {
List<String> hotWords = new ArrayList<>();
// redis 排序中下标从0开始所以这里需要 -1 处理
count = count - 1;
Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count);
if (set.isEmpty() || set == null) {