|
@@ -98,7 +98,6 @@ public class GeneralSpiderStrategy implements FilterStrategy {
|
|
|
|
|
|
@Override
|
|
|
public List<Long> filter(FilterParam param) {
|
|
|
- log.info("generalSpiderStrategy filter param {}", JSON.toJSONString(param));
|
|
|
if (param == null) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
@@ -112,7 +111,6 @@ public class GeneralSpiderStrategy implements FilterStrategy {
|
|
|
.map(id -> String.format(keyFormat, id))
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- log.info("generalSpiderStrategy filter keys {}", JSON.toJSONString(keys));
|
|
|
|
|
|
List<String> uids = redisTemplate.opsForValue().multiGet(keys);
|
|
|
List<Long> cacheMissVideoIds = new ArrayList<>();
|
|
@@ -157,14 +155,10 @@ public class GeneralSpiderStrategy implements FilterStrategy {
|
|
|
//不过滤的视频
|
|
|
Set<Long> data = generalSpiderExcludeVideoCache.getUnchecked(generalSpiderExcludeVideoCacheKey);
|
|
|
|
|
|
-
|
|
|
- log.info("generalSpiderStrategy filter generalSpiderUserIds = {} data = {}", JSON.toJSONString(generalSpiderUserIds), JSON.toJSONString(data));
|
|
|
-
|
|
|
List<Long> videoIds = param.getVideoIds().stream()
|
|
|
.filter(l -> data.contains(l)
|
|
|
|| (vid2UidMap.containsKey(l) && !generalSpiderUserIds.contains(vid2UidMap.get(l))))
|
|
|
.collect(Collectors.toList());
|
|
|
- log.info("generalSpiderStrategy filter videoIds = {}", JSON.toJSONString(videoIds));
|
|
|
|
|
|
return videoIds;
|
|
|
}
|