缓存判定问题处理
This commit is contained in:
parent
5ee25262aa
commit
d93e11b302
@ -107,8 +107,8 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
|
||||
// redis 排序中,下标从0开始,所以这里需要 -1 处理
|
||||
count = count - 1;
|
||||
Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count);
|
||||
if (set.isEmpty() || set == null) {
|
||||
return null;
|
||||
if (set == null || set.isEmpty()) {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
for (DefaultTypedTuple defaultTypedTuple : set) {
|
||||
hotWords.add(Objects.requireNonNull(defaultTypedTuple.getValue()).toString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user