|
@@ -85,15 +85,15 @@ public class ContentPlatformDatastatJob {
|
|
|
ContentPlatformGzhPlanTypeEnum.AUTO_REPLY.getVal());
|
|
|
List<Long> planIds = gzhPlanList.stream().map(ContentPlatformGzhPlan::getId).collect(Collectors.toList());
|
|
|
Map<Long, List<Long>> gzhPlanMap = gzhPlanList.stream()
|
|
|
- .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
|
|
|
- Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
|
|
|
+ .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
|
|
|
+ Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
|
|
|
List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = planService.getGzhPlanVideoList(planIds);
|
|
|
Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
- .collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
|
|
|
+ .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) {
|
|
@@ -158,7 +158,7 @@ public class ContentPlatformDatastatJob {
|
|
|
// 所有公众号
|
|
|
List<ContentPlatformAccount> accountList = getAllAccount();
|
|
|
Map<String, ContentPlatformAccount> accountMap = accountList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformAccount::getChannel, account -> account));
|
|
|
+ .collect(Collectors.toMap(ContentPlatformAccount::getChannel, account -> account));
|
|
|
List<ContentPlatformGzhAccount> gzhAccountList = getAllGzhAccount();
|
|
|
Map<Long, List<ContentPlatformGzhAccount>> gzhAccountMap = gzhAccountList.stream()
|
|
|
.collect(Collectors.groupingBy(ContentPlatformGzhAccount::getCreateAccountId));
|
|
@@ -172,15 +172,15 @@ public class ContentPlatformDatastatJob {
|
|
|
ContentPlatformGzhPlanTypeEnum.AUTO_REPLY.getVal());
|
|
|
List<Long> planIds = gzhPlanList.stream().map(ContentPlatformGzhPlan::getId).collect(Collectors.toList());
|
|
|
Map<Long, List<Long>> gzhPlanMap = gzhPlanList.stream()
|
|
|
- .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
|
|
|
- Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
|
|
|
+ .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
|
|
|
+ Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
|
|
|
List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = planService.getGzhPlanVideoList(planIds);
|
|
|
Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
- .collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
|
|
|
+ .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) {
|
|
@@ -267,15 +267,15 @@ public class ContentPlatformDatastatJob {
|
|
|
ContentPlatformGzhPlanTypeEnum.FWH_PUSH.getVal());
|
|
|
List<Long> planIds = gzhPlanList.stream().map(ContentPlatformGzhPlan::getId).collect(Collectors.toList());
|
|
|
Map<Long, List<Long>> gzhPlanMap = gzhPlanList.stream()
|
|
|
- .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
|
|
|
- Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
|
|
|
+ .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
|
|
|
+ Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
|
|
|
List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = planService.getGzhPlanVideoList(planIds);
|
|
|
Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
- .collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
|
|
|
+ .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) {
|
|
@@ -360,9 +360,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) {
|
|
@@ -462,15 +462,15 @@ public class ContentPlatformDatastatJob {
|
|
|
List<ContentPlatformQwDataStat> existList = getQwDatastatCount(dt);
|
|
|
List<String> existRootSourceIds = existList.stream().map(ContentPlatformQwDataStat::getRootSourceId).collect(Collectors.toList());
|
|
|
Map<String, Long> rootSourceIdMap = qwPlanList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformQwPlan::getRootSourceId, ContentPlatformQwPlan::getId));
|
|
|
+ .collect(Collectors.toMap(ContentPlatformQwPlan::getRootSourceId, ContentPlatformQwPlan::getId));
|
|
|
List<Long> planIds = qwPlanList.stream().map(ContentPlatformQwPlan::getId).collect(Collectors.toList());
|
|
|
List<ContentPlatformQwPlanVideo> planVideoList = planService.getQwPlanVideoList(planIds);
|
|
|
Map<Long, Long> planVideoMap = planVideoList.stream()
|
|
|
- .collect(Collectors.toMap(ContentPlatformQwPlanVideo::getPlanId, ContentPlatformQwPlanVideo::getVideoId));
|
|
|
+ .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);
|