|
|
@@ -276,4 +276,18 @@ public class CgiReplyServiceImpl implements CgiReplyService {
|
|
|
return coverUrl + coverSuffix;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Boolean checkExistRootSourceId(String rootSourceId) {
|
|
|
+ String redisKey = "check_exist_root_source_id_" + rootSourceId;
|
|
|
+ String value = redisUtils.get(redisKey);
|
|
|
+ if (StringUtils.isNotEmpty(value)) {
|
|
|
+ return Boolean.parseBoolean(value);
|
|
|
+ }
|
|
|
+ List<CgiReplyBucketData> list = getCgiReplyBucketDataListByRootSourceId(rootSourceId);
|
|
|
+ boolean exists = !CollectionUtils.isEmpty(list);
|
|
|
+ // 缓存1小时
|
|
|
+ redisUtils.set(redisKey, String.valueOf(exists), 60 * 60);
|
|
|
+ return exists;
|
|
|
+ }
|
|
|
+
|
|
|
}
|