|
@@ -131,7 +131,8 @@ public class RankService {
|
|
|
|
|
|
// pushFromRank
|
|
|
Map<String, List<Video>> pushFromVideosMap = param.getRecallResult().getData().stream()
|
|
|
- .collect(Collectors.toMap(RecallResult.RecallData::getPushFrom, RecallResult.RecallData::getVideos));
|
|
|
+ .collect(Collectors.toMap(RecallResult.RecallData::getPushFrom, result -> result.getVideos() == null
|
|
|
+ ? new ArrayList<>() : result.getVideos(), (v1, v2) -> v2));
|
|
|
for (RecallResult.RecallData data : param.getRecallResult().getData()) {
|
|
|
if (CollectionUtils.isEmpty(data.getVideos())) {
|
|
|
continue;
|
|
@@ -149,7 +150,7 @@ public class RankService {
|
|
|
if (CollectionUtils.isNotEmpty(videos)) {
|
|
|
for (int i = 0; i < videos.size(); i++) {
|
|
|
if (Objects.equals(videos.get(i).getVideoId(), video.getVideoId())) {
|
|
|
- pushFromRank.put(p, i);
|
|
|
+ pushFromRank.put(p, i + 1);
|
|
|
break;
|
|
|
}
|
|
|
}
|