|
@@ -2664,13 +2664,13 @@ public class DataDashboardService {
|
|
|
|
|
|
List<Pair<String, String>> styles = Arrays
|
|
|
.asList(
|
|
|
- Pair.of("H", "0.00%"),
|
|
|
- Pair.of("L", "0.00%"),
|
|
|
+ Pair.of("I", "0.00%"),
|
|
|
Pair.of("M", "0.00%"),
|
|
|
Pair.of("N", "0.00%"),
|
|
|
- Pair.of("R", "0.00%"),
|
|
|
+ Pair.of("O", "0.00%"),
|
|
|
Pair.of("S", "0.00%"),
|
|
|
- Pair.of("T", "0.00%")
|
|
|
+ Pair.of("T", "0.00%"),
|
|
|
+ Pair.of("U", "0.00%")
|
|
|
);
|
|
|
List<Pair<String, List<Pair<String, String>>>> thank = Arrays
|
|
|
.asList(
|
|
@@ -2694,7 +2694,12 @@ public class DataDashboardService {
|
|
|
Pair.of("D", Arrays.asList(
|
|
|
Pair.of("SUM", "#BACEFD"),
|
|
|
Pair.of("相同", "#FED4A4"),
|
|
|
- Pair.of("不同", "#B1E8FC")))
|
|
|
+ Pair.of("不同", "#B1E8FC"))),
|
|
|
+ Pair.of("E", Arrays.asList(
|
|
|
+ Pair.of("SUM", "#BACEFD"),
|
|
|
+ Pair.of("头条", "#FED4A4"),
|
|
|
+ Pair.of("次条", "#B1E8FC"),
|
|
|
+ Pair.of("3-8", "#F8E6AB")))
|
|
|
);
|
|
|
doSendFeishuSheet(dateStrList, dailyDetailSheetToken, "qvxJsD", rowNum, rows,
|
|
|
2, styles, null, thank);
|
|
@@ -2773,6 +2778,13 @@ public class DataDashboardService {
|
|
|
}
|
|
|
|
|
|
result.add(buildContentEffectGroupBySourceSum(dateStr, result));
|
|
|
+ Iterator<ContentEffectGroupBySourceExport> iterator = result.iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ ContentEffectGroupBySourceExport export = iterator.next();
|
|
|
+ if (export.getFansCount() == 0) {
|
|
|
+ iterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -2793,44 +2805,49 @@ public class DataDashboardService {
|
|
|
|| (export.getIsSameMiniprogram().equals("不同") && !isSameMiniProgram)
|
|
|
|| export.getIsSameMiniprogram().equals("SUM")) {
|
|
|
if (export.getSource().contains("SUM") || export.getSource().equals(source)) {
|
|
|
- if (Objects.nonNull(datastatSortStrategy.getFans())) {
|
|
|
- export.setFansCount(export.getFansCount() + datastatSortStrategy.getFans());
|
|
|
- }
|
|
|
- export.setPublishContentCount(export.getPublishContentCount() + 1);
|
|
|
- export.setReadCount(export.getReadCount() + article.getShowViewCount());
|
|
|
- if (CollectionUtil.isNotEmpty(detailInfoList)) {
|
|
|
- int totalFirstLevel = 0;
|
|
|
- int totalT0Fission = 0;
|
|
|
- int card1FirstLevel = 0;
|
|
|
- int card1T0Fission = 0;
|
|
|
- int card2FirstLevel = 0;
|
|
|
- int card2T0Fission = 0;
|
|
|
- for (ArticleDetailInfo articleDetailInfo : detailInfoList) {
|
|
|
- if (Objects.isNull(articleDetailInfo.getFirstLevel())) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (articleDetailInfo.getVideoIndex() == 1) {
|
|
|
- card1FirstLevel += articleDetailInfo.getFirstLevel();
|
|
|
- if (Objects.nonNull(articleDetailInfo.getFission0())) {
|
|
|
- card1T0Fission += articleDetailInfo.getFission0();
|
|
|
+ if ((article.getItemIndex() == 1 && "头条".equals(export.getPosition()))
|
|
|
+ || (article.getItemIndex() == 2 && "次条".equals(export.getPosition()))
|
|
|
+ || (article.getItemIndex() > 2 && "3-8".equals(export.getPosition()))
|
|
|
+ || export.getPosition().equals("SUM")) {
|
|
|
+ if (Objects.nonNull(datastatSortStrategy.getFans())) {
|
|
|
+ export.setFansCount(export.getFansCount() + datastatSortStrategy.getFans());
|
|
|
+ }
|
|
|
+ export.setPublishContentCount(export.getPublishContentCount() + 1);
|
|
|
+ export.setReadCount(export.getReadCount() + article.getShowViewCount());
|
|
|
+ if (CollectionUtil.isNotEmpty(detailInfoList)) {
|
|
|
+ int totalFirstLevel = 0;
|
|
|
+ int totalT0Fission = 0;
|
|
|
+ int card1FirstLevel = 0;
|
|
|
+ int card1T0Fission = 0;
|
|
|
+ int card2FirstLevel = 0;
|
|
|
+ int card2T0Fission = 0;
|
|
|
+ for (ArticleDetailInfo articleDetailInfo : detailInfoList) {
|
|
|
+ if (Objects.isNull(articleDetailInfo.getFirstLevel())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (articleDetailInfo.getVideoIndex() == 1) {
|
|
|
+ card1FirstLevel += articleDetailInfo.getFirstLevel();
|
|
|
+ if (Objects.nonNull(articleDetailInfo.getFission0())) {
|
|
|
+ card1T0Fission += articleDetailInfo.getFission0();
|
|
|
+ }
|
|
|
+ } else if (articleDetailInfo.getVideoIndex() == 2) {
|
|
|
+ card2FirstLevel += articleDetailInfo.getFirstLevel();
|
|
|
+ if (Objects.nonNull(articleDetailInfo.getFission0())) {
|
|
|
+ card2T0Fission += articleDetailInfo.getFission0();
|
|
|
+ }
|
|
|
}
|
|
|
- } else if (articleDetailInfo.getVideoIndex() == 2) {
|
|
|
- card2FirstLevel += articleDetailInfo.getFirstLevel();
|
|
|
+ totalFirstLevel += articleDetailInfo.getFirstLevel();
|
|
|
if (Objects.nonNull(articleDetailInfo.getFission0())) {
|
|
|
- card2T0Fission += articleDetailInfo.getFission0();
|
|
|
+ totalT0Fission += articleDetailInfo.getFission0();
|
|
|
}
|
|
|
}
|
|
|
- totalFirstLevel += articleDetailInfo.getFirstLevel();
|
|
|
- if (Objects.nonNull(articleDetailInfo.getFission0())) {
|
|
|
- totalT0Fission += articleDetailInfo.getFission0();
|
|
|
- }
|
|
|
+ export.setFirstLevel(export.getFirstLevel() + totalFirstLevel);
|
|
|
+ export.setMiniprogram1FirstLevel(export.getMiniprogram1FirstLevel() + card1FirstLevel);
|
|
|
+ export.setMiniprogram2FirstLevel(export.getMiniprogram2FirstLevel() + card2FirstLevel);
|
|
|
+ export.setT0Fission(export.getT0Fission() + totalT0Fission);
|
|
|
+ export.setMiniprogram1T0Fission(export.getMiniprogram1T0Fission() + card1T0Fission);
|
|
|
+ export.setMiniprogram2T0Fission(export.getMiniprogram2T0Fission() + card2T0Fission);
|
|
|
}
|
|
|
- export.setFirstLevel(export.getFirstLevel() + totalFirstLevel);
|
|
|
- export.setMiniprogram1FirstLevel(export.getMiniprogram1FirstLevel() + card1FirstLevel);
|
|
|
- export.setMiniprogram2FirstLevel(export.getMiniprogram2FirstLevel() + card2FirstLevel);
|
|
|
- export.setT0Fission(export.getT0Fission() + totalT0Fission);
|
|
|
- export.setMiniprogram1T0Fission(export.getMiniprogram1T0Fission() + card1T0Fission);
|
|
|
- export.setMiniprogram2T0Fission(export.getMiniprogram2T0Fission() + card2T0Fission);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2853,14 +2870,18 @@ public class DataDashboardService {
|
|
|
List<String> isSameMiniprogram = Arrays.asList("相同", "不同", "SUM");
|
|
|
List<String> articleSource = Arrays.asList("公众号文章", "头条文章");
|
|
|
List<String> videoSource = Arrays.asList("公众号视频", "好看视频", "视频号视频", "头条视频", "搜狐视频");
|
|
|
+ List<String> positionList = Arrays.asList("头条", "次条", "3-8");
|
|
|
for (String source : articleSource) {
|
|
|
for (String same : isSameMiniprogram) {
|
|
|
- ContentEffectGroupBySourceExport item = new ContentEffectGroupBySourceExport();
|
|
|
- item.setDateStr(dateStr);
|
|
|
- item.setType("文章");
|
|
|
- item.setSource(source);
|
|
|
- item.setIsSameMiniprogram(same);
|
|
|
- result.add(item);
|
|
|
+ for (String position : positionList) {
|
|
|
+ ContentEffectGroupBySourceExport item = new ContentEffectGroupBySourceExport();
|
|
|
+ item.setDateStr(dateStr);
|
|
|
+ item.setType("文章");
|
|
|
+ item.setSource(source);
|
|
|
+ item.setIsSameMiniprogram(same);
|
|
|
+ item.setPosition(position);
|
|
|
+ result.add(item);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
for (String same : isSameMiniprogram) {
|
|
@@ -2872,12 +2893,15 @@ public class DataDashboardService {
|
|
|
result.add(item);
|
|
|
}
|
|
|
for (String source : videoSource) {
|
|
|
- ContentEffectGroupBySourceExport item = new ContentEffectGroupBySourceExport();
|
|
|
- item.setDateStr(dateStr);
|
|
|
- item.setType("视频");
|
|
|
- item.setSource(source);
|
|
|
- item.setIsSameMiniprogram("SUM");
|
|
|
- result.add(item);
|
|
|
+ for (String position : positionList) {
|
|
|
+ ContentEffectGroupBySourceExport item = new ContentEffectGroupBySourceExport();
|
|
|
+ item.setDateStr(dateStr);
|
|
|
+ item.setType("视频");
|
|
|
+ item.setSource(source);
|
|
|
+ item.setIsSameMiniprogram("SUM");
|
|
|
+ item.setPosition(position);
|
|
|
+ result.add(item);
|
|
|
+ }
|
|
|
}
|
|
|
ContentEffectGroupBySourceExport item = new ContentEffectGroupBySourceExport();
|
|
|
item.setDateStr(dateStr);
|
|
@@ -3705,7 +3729,7 @@ public class DataDashboardService {
|
|
|
}
|
|
|
for (Map.Entry<String, CategoryGroupDataExport> item : sumMap.entrySet()) {
|
|
|
CategoryGroupDataExport export = item.getValue();
|
|
|
- if (export.getFansCount()!= null && export.getFansCount()!= 0) {
|
|
|
+ if (export.getFansCount() != null && export.getFansCount() != 0) {
|
|
|
export.setOpenRate((double) export.getFirstLevel() / export.getFansCount());
|
|
|
}
|
|
|
result.add(export);
|