|
@@ -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().filter(o -> Objects.nonNull(o.getChannel()) && Objects.nonNull(o.getScore()))
|
|
|
+ Map<String, Double> channelScoreMap = channelScoreList.stream()
|
|
|
.collect(Collectors.toMap(ContentPlatformQwDataStatReplyTotal::getChannel, ContentPlatformQwDataStatReplyTotal::getScore, (a, b) -> a));
|
|
|
for (ContentPlatformQwDataStatReplyTotal item : saveList) {
|
|
|
item.setScore(channelScoreMap.get(item.getChannel()));
|
|
@@ -713,11 +713,17 @@ public class ContentPlatformDatastatJob {
|
|
|
Map<Long, List<ContentPlatformQwPlan>> qwPlanMap = qwPlanList.stream().collect(
|
|
|
Collectors.groupingBy(ContentPlatformQwPlan::getCreateAccountId));
|
|
|
List<Long> qwPlanIds = qwPlanList.stream().map(ContentPlatformQwPlan::getId).collect(Collectors.toList());
|
|
|
- List<ContentPlatformQwPlanVideo> qwPlanVideoList = getSubChannelQwPlanVideoList(qwPlanIds);
|
|
|
+ List<ContentPlatformQwPlanVideo> qwPlanVideoList = new ArrayList<>();
|
|
|
+ if (CollectionUtils.isNotEmpty(qwPlanIds)) {
|
|
|
+ qwPlanVideoList = getSubChannelQwPlanVideoList(qwPlanIds);
|
|
|
+ }
|
|
|
Map<Long, List<ContentPlatformQwPlanVideo>> qwPlanVideoMap = qwPlanVideoList.stream()
|
|
|
.collect(Collectors.groupingBy(ContentPlatformQwPlanVideo::getPlanId));
|
|
|
List<Long> videoIdList = qwPlanVideoList.stream().map(ContentPlatformQwPlanVideo::getVideoId).collect(Collectors.toList());
|
|
|
- List<ContentPlatformVideo> videoList = planService.getVideoContentListByVideoIds(videoIdList);
|
|
|
+ List<ContentPlatformVideo> videoList = new ArrayList<>();
|
|
|
+ if (CollectionUtils.isNotEmpty(videoIdList)) {
|
|
|
+ videoList = planService.getVideoContentListByVideoIds(videoIdList);
|
|
|
+ }
|
|
|
Map<Long, Double> videoScoreMap = videoList.stream()
|
|
|
.collect(Collectors.toMap(ContentPlatformVideo::getVideoId, ContentPlatformVideo::getScore, (a, b) -> a));
|
|
|
Long now = System.currentTimeMillis();
|