恢复代码
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user