恢复代码

This commit is contained in:
lifenlong
2021-08-04 09:27:23 +08:00
parent ce22c9b7ff
commit 77a30459cd
4 changed files with 9 additions and 14 deletions

View File

@@ -104,12 +104,12 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
@Override
public List<String> getHotWords(Integer count) {
List<String> hotWords = new ArrayList<>();
if (hotWords.isEmpty() || hotWords == null) {
return null;
}
//下表从0开始所以count-1
count = count - 1;
Set<DefaultTypedTuple> set = cache.reverseRangeWithScores(CachePrefix.HOT_WORD.getPrefix(), count);
if (set.isEmpty() || set == null) {
return null;
}
for (DefaultTypedTuple defaultTypedTuple : set) {
hotWords.add(Objects.requireNonNull(defaultTypedTuple.getValue()).toString());
}

View File

@@ -48,11 +48,10 @@ public class VerificationSourceServiceImpl extends ServiceImpl<VerificationSourc
@Override
public VerificationDTO getVerificationCache() {
return initCache();
// VerificationDTO verificationDTO = cache.get(VERIFICATION_CACHE);
// if (verificationDTO == null) {
//
// }
// return verificationDTO;
VerificationDTO verificationDTO = cache.get(VERIFICATION_CACHE);
if (verificationDTO == null) {
return initCache();
}
return verificationDTO;
}
}