|
|
@@ -47,13 +47,15 @@ public class RiskVideoStrategy implements FilterStrategy {
|
|
|
.build(new CacheLoader<String, Set<Long>>() {
|
|
|
@Override
|
|
|
public Set<Long> load(String key) {
|
|
|
- List<WxVideoTagRel> rels = repository.findAllByTagIdIn(riskVideoTagIds);
|
|
|
-// return CommonCollectionUtils.toSet(rels, WxVideoTagRel::getVideoId)
|
|
|
- //原标签内容保留 用于实时处理
|
|
|
Set<Long> riskVideoIdSet = new HashSet<>();
|
|
|
- Set<Long> tagVideoIds = CommonCollectionUtils.toSet(rels, WxVideoTagRel::getVideoId);
|
|
|
- if (Objects.nonNull(tagVideoIds) && !tagVideoIds.isEmpty()) {
|
|
|
- riskVideoIdSet.addAll(tagVideoIds);
|
|
|
+ if (Objects.nonNull(riskVideoTagIds) && !riskVideoTagIds.isEmpty()) {
|
|
|
+ List<WxVideoTagRel> rels = repository.findAllByTagIdIn(riskVideoTagIds);
|
|
|
+// return CommonCollectionUtils.toSet(rels, WxVideoTagRel::getVideoId)
|
|
|
+ //原标签内容保留 用于实时处理
|
|
|
+ Set<Long> tagVideoIds = CommonCollectionUtils.toSet(rels, WxVideoTagRel::getVideoId);
|
|
|
+ if (Objects.nonNull(tagVideoIds) && !tagVideoIds.isEmpty()) {
|
|
|
+ riskVideoIdSet.addAll(tagVideoIds);
|
|
|
+ }
|
|
|
}
|
|
|
//改为视频list 不超过10w条
|
|
|
Set<String> videoIdSet = redisTemplate.opsForSet().members(RedisKeyConstants.Recommend.WECHAT_RISK_VIDEO_CACHE_KEY);
|