|
@@ -38,6 +38,16 @@ public abstract class RankService {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (param.isAppTypeSpecialRecommend()) {
|
|
|
|
|
+ Optional<RecallResult.RecallData> data = param.getRecallResult().getData().stream()
|
|
|
|
|
+ .filter(d -> d.getPushFrom().equals(AppTypeSpecialRecallStrategy.PUSH_FROM))
|
|
|
|
|
+ .findFirst();
|
|
|
|
|
+ if (data.isPresent() && CollectionUtils.isNotEmpty(data.get().getVideos())) {
|
|
|
|
|
+ return new RankResult(data.get().getVideos());
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (2 == param.getRecommendType()) {
|
|
if (2 == param.getRecommendType()) {
|
|
|
tagDuplicateVideos(param);
|
|
tagDuplicateVideos(param);
|
|
|
List<Video> rovRecallRank = mergeAndRankRovRecall(param);
|
|
List<Video> rovRecallRank = mergeAndRankRovRecall(param);
|
|
@@ -55,16 +65,6 @@ public abstract class RankService {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (param.isAppTypeSpecialRecommend()) {
|
|
|
|
|
- Optional<RecallResult.RecallData> data = param.getRecallResult().getData().stream()
|
|
|
|
|
- .filter(d -> d.getPushFrom().equals(AppTypeSpecialRecallStrategy.PUSH_FROM))
|
|
|
|
|
- .findFirst();
|
|
|
|
|
- if (data.isPresent() && CollectionUtils.isNotEmpty(data.get().getVideos())) {
|
|
|
|
|
- return new RankResult(data.get().getVideos());
|
|
|
|
|
- }
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// 1 通过 apptype 判断该小程序走怎样的排序策略。
|
|
// 1 通过 apptype 判断该小程序走怎样的排序策略。
|
|
|
if (param.getAppType() == AppTypeEnum.PIAO_QUAN_MEIHAO_ZHUFU.getCode() && Objects.equals(param.getCategoryId(), 100)) {
|
|
if (param.getAppType() == AppTypeEnum.PIAO_QUAN_MEIHAO_ZHUFU.getCode() && Objects.equals(param.getCategoryId(), 100)) {
|
|
|
List<Video> results = new ArrayList<>(extractAndSort(param, BlessRecallStrategy.PUSH_FORM));
|
|
List<Video> results = new ArrayList<>(extractAndSort(param, BlessRecallStrategy.PUSH_FORM));
|