瀏覽代碼

DEL: AbstractNewContentVideoRecallStrategy filterService

sunxy 1 年之前
父節點
當前提交
d16cb55674

+ 19 - 13
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/recall/strategy/AbstractNewContentVideoRecallStrategy.java

@@ -34,8 +34,8 @@ public abstract class AbstractNewContentVideoRecallStrategy implements RecallStr
     @Value("${flow.pool.recent.top.video.daily.time.range:}")
     private String timeRangeJson;
 
-    @Autowired
-    protected RegionFilterService filterService;
+//    @Autowired
+//    protected RegionFilterService filterService;
 
     @Override
     public List<Video> recall(RecallParam param) {
@@ -53,17 +53,23 @@ public abstract class AbstractNewContentVideoRecallStrategy implements RecallStr
         }
         try {
             List<Long> videoIdList = JSONObject.parseArray(result.toString(), Long.class);
-            FilterResult filterResult = filterService.filter(FilterParamFactory.create(param, Lists.newArrayList(videoIdList)));
-            if (filterResult != null && CollectionUtils.isNotEmpty(filterResult.getVideoIds())) {
-                return filterResult.getVideoIds().stream().map(vid -> {
-                    Video recallData = new Video();
-                    recallData.setVideoId(vid);
-                    recallData.setAbCode(param.getAbCode());
-                    recallData.setPushFrom(pushFrom());
-                    return recallData;
-                }).limit(5).collect(Collectors.toList());
-            }
-
+//            FilterResult filterResult = filterService.filter(FilterParamFactory.create(param, Lists.newArrayList(videoIdList)));
+//            if (filterResult != null && CollectionUtils.isNotEmpty(filterResult.getVideoIds())) {
+//                return filterResult.getVideoIds().stream().map(vid -> {
+//                    Video recallData = new Video();
+//                    recallData.setVideoId(vid);
+//                    recallData.setAbCode(param.getAbCode());
+//                    recallData.setPushFrom(pushFrom());
+//                    return recallData;
+//                }).limit(5).collect(Collectors.toList());
+//            }
+            return videoIdList.stream().map(vid -> {
+                Video recallData = new Video();
+                recallData.setVideoId(vid);
+                recallData.setAbCode(param.getAbCode());
+                recallData.setPushFrom(pushFrom());
+                return recallData;
+            }).limit(5).collect(Collectors.toList());
         } catch (Exception e) {
             log.error("recall error, key={}, result={}", key, result, e);
         }