|
@@ -94,9 +94,9 @@ public class ContentPlatformDatastatJob {
|
|
|
Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
.collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
|
|
|
List<Long> videoIds = gzhPlanVideoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
|
|
|
- List<ContentPlatformVideo> contentPlatformVideoList = planService.getVideoContentListByVideoIds(videoIds);
|
|
|
- Map<Long, ContentPlatformVideo> videoMap = contentPlatformVideoList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video, (a, b) -> a));
|
|
|
+ List<ContentPlatformVideoAgg> contentPlatformVideoList = planService.getVideoContentAggListByVideoIds(videoIds);
|
|
|
+ Map<Long, ContentPlatformVideoAgg> videoMap = contentPlatformVideoList.stream()
|
|
|
+ .collect(Collectors.toMap(ContentPlatformVideoAgg::getVideoId, video -> video, (a, b) -> a));
|
|
|
if (CollectionUtils.isNotEmpty(dataList)) {
|
|
|
List<ContentPlatformGzhDataStat> saveList = new ArrayList<>();
|
|
|
for (Record record : dataList) {
|
|
@@ -181,9 +181,9 @@ public class ContentPlatformDatastatJob {
|
|
|
Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
.collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
|
|
|
List<Long> videoIds = gzhPlanVideoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
|
|
|
- List<ContentPlatformVideo> contentPlatformVideoList = planService.getVideoContentListByVideoIds(videoIds);
|
|
|
- Map<Long, ContentPlatformVideo> videoMap = contentPlatformVideoList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video, (a, b) -> a));
|
|
|
+ List<ContentPlatformVideoAgg> contentPlatformVideoList = planService.getVideoContentAggListByVideoIds(videoIds);
|
|
|
+ Map<Long, ContentPlatformVideoAgg> videoMap = contentPlatformVideoList.stream()
|
|
|
+ .collect(Collectors.toMap(ContentPlatformVideoAgg::getVideoId, video -> video, (a, b) -> a));
|
|
|
if (CollectionUtils.isNotEmpty(dataList)) {
|
|
|
List<ContentPlatformGzhDataStatTotal> saveList = new ArrayList<>();
|
|
|
for (Record record : dataList) {
|
|
@@ -276,9 +276,9 @@ public class ContentPlatformDatastatJob {
|
|
|
Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
.collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
|
|
|
List<Long> videoIds = gzhPlanVideoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
|
|
|
- List<ContentPlatformVideo> contentPlatformVideoList = planService.getVideoContentListByVideoIds(videoIds);
|
|
|
- Map<Long, ContentPlatformVideo> videoMap = contentPlatformVideoList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video, (a, b) -> a));
|
|
|
+ List<ContentPlatformVideoAgg> contentPlatformVideoList = planService.getVideoContentAggListByVideoIds(videoIds);
|
|
|
+ Map<Long, ContentPlatformVideoAgg> videoMap = contentPlatformVideoList.stream()
|
|
|
+ .collect(Collectors.toMap(ContentPlatformVideoAgg::getVideoId, video -> video, (a, b) -> a));
|
|
|
if (CollectionUtils.isNotEmpty(dataList)) {
|
|
|
List<ContentPlatformFwhDataStat> saveList = new ArrayList<>();
|
|
|
for (Record record : dataList) {
|
|
@@ -363,9 +363,9 @@ public class ContentPlatformDatastatJob {
|
|
|
Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
.collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
|
|
|
List<Long> videoIds = gzhPlanVideoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
|
|
|
- List<ContentPlatformVideo> contentPlatformVideoList = planService.getVideoContentListByVideoIds(videoIds);
|
|
|
- Map<Long, ContentPlatformVideo> videoMap = contentPlatformVideoList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video, (a, b) -> a));
|
|
|
+ List<ContentPlatformVideoAgg> contentPlatformVideoList = planService.getVideoContentAggListByVideoIds(videoIds);
|
|
|
+ Map<Long, ContentPlatformVideoAgg> videoMap = contentPlatformVideoList.stream()
|
|
|
+ .collect(Collectors.toMap(ContentPlatformVideoAgg::getVideoId, video -> video, (a, b) -> a));
|
|
|
if (CollectionUtils.isNotEmpty(dataList)) {
|
|
|
List<ContentPlatformFwhDataStatTotal> saveList = new ArrayList<>();
|
|
|
for (Record record : dataList) {
|
|
@@ -471,9 +471,9 @@ public class ContentPlatformDatastatJob {
|
|
|
Map<Long, Long> planVideoMap = planVideoList.stream()
|
|
|
.collect(Collectors.toMap(ContentPlatformQwPlanVideo::getPlanId, ContentPlatformQwPlanVideo::getVideoId));
|
|
|
List<Long> videoIds = planVideoList.stream().map(ContentPlatformQwPlanVideo::getVideoId).collect(Collectors.toList());
|
|
|
- List<ContentPlatformVideo> videoList = planService.getVideoContentListByVideoIds(videoIds);
|
|
|
+ List<ContentPlatformVideoAgg> videoList = planService.getVideoContentAggListByVideoIds(videoIds);
|
|
|
Map<Long, Double> videoScoreMap = videoList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, ContentPlatformVideo::getScore, (a, b) -> a));
|
|
|
+ .collect(Collectors.toMap(ContentPlatformVideoAgg::getVideoId, ContentPlatformVideoAgg::getScore, (a, b) -> a));
|
|
|
List<ContentPlatformQwDataStat> saveList = new ArrayList<>();
|
|
|
List<String> rootSourceIds = qwPlanList.stream().map(ContentPlatformQwPlan::getRootSourceId).collect(Collectors.toList());
|
|
|
String outSql = String.format("SELECT * FROM loghubods.qw_out_touliu_behavior_detail WHERE dt=%s;", dt);
|
|
@@ -687,7 +687,7 @@ public class ContentPlatformDatastatJob {
|
|
|
if (CollectionUtils.isNotEmpty(saveList)) {
|
|
|
List<String> channels = saveList.stream().map(ContentPlatformQwDataStatReplyTotal::getChannel).distinct().collect(Collectors.toList());
|
|
|
List<ContentPlatformQwDataStatReplyTotal> channelScoreList = dataStatMapperExt.getQwTotalDatastatReplyScoreList(dt, channels);
|
|
|
- Map<String, Double> channelScoreMap = channelScoreList.stream()
|
|
|
+ Map<String, Double> channelScoreMap = channelScoreList.stream().filter(o -> Objects.nonNull(o.getChannel()) && Objects.nonNull(o.getScore()))
|
|
|
.collect(Collectors.toMap(ContentPlatformQwDataStatReplyTotal::getChannel, ContentPlatformQwDataStatReplyTotal::getScore, (a, b) -> a));
|
|
|
for (ContentPlatformQwDataStatReplyTotal item : saveList) {
|
|
|
item.setScore(channelScoreMap.get(item.getChannel()));
|