丁云鹏 1 year ago
parent
commit
a8293f4c8e

+ 6 - 2
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/filter/strategy/SecurityStrategy.java

@@ -68,7 +68,6 @@ public class SecurityStrategy implements FilterStrategy {
         }
         for (String cityCode : videoFilterCityTagIdMap.keySet()) {
             Set<Long> result = videoCache.getUnchecked(cityCode);
-            log.info("SecurityStrategy result {}", JSONUtils.toJson(result));
         }
     }
 
@@ -100,9 +99,14 @@ public class SecurityStrategy implements FilterStrategy {
             if (CollectionUtils.isEmpty(filterVideos)) {
                 return param.getVideoIds();
             }
-            return param.getVideoIds().stream()
+
+            List<Long> result = param.getVideoIds().stream()
                     .filter(l -> !filterVideos.contains(l))
                     .collect(Collectors.toList());
+
+            log.info("SecurityStrategy before={} after={}", JSONUtils.toJson(param.getVideoIds()), JSONUtils.toJson(result));
+
+            return result;
         }
         return param.getVideoIds();
     }