|
@@ -8,6 +8,7 @@ import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.StatusEnum;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.aigc.ProduceContentAuditStatusEnum;
|
|
|
+import com.tzld.longarticle.recommend.server.common.enums.longArticle.ArticleVideoAuditStatusEnum;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.recommend.AccountBusinessTypeEnum;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.recommend.ArticleTypeEnum;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.recommend.ContentPoolEnum;
|
|
@@ -2003,7 +2004,7 @@ public class DataDashboardService {
|
|
|
|
|
|
List<Pair<String, String>> styles = Arrays
|
|
|
.asList(
|
|
|
- Pair.of("G", "0.00%")
|
|
|
+ Pair.of("H", "0.00%")
|
|
|
);
|
|
|
|
|
|
doSendFeishuSheet(dateStrList, dailyDetailSheetToken, "vddANt", rowNum, rows,
|
|
@@ -2014,6 +2015,11 @@ public class DataDashboardService {
|
|
|
List<VideoAuditExport> result = new ArrayList<>();
|
|
|
long timestamp = DateUtils.getStartOfDay(dateStr, "yyyyMMdd") * 1000;
|
|
|
// 按内容池区分
|
|
|
+ List<LongArticleTitleAudit> waitingAuditList = titleAuditRepository.getByStatus(ArticleVideoAuditStatusEnum.WAITING.getCode());
|
|
|
+ List<String> waitingAuditContentIds = waitingAuditList.stream().map(LongArticleTitleAudit::getContentId).collect(Collectors.toList());
|
|
|
+ List<ContentPoolTypeDTO> waitingAuditPoolTypeDTOS = aigcBaseMapper.getContentPoolType(waitingAuditContentIds);
|
|
|
+ Map<String, List<ContentPoolTypeDTO>> waitingAuditPoolTypeMap = waitingAuditPoolTypeDTOS.stream()
|
|
|
+ .collect(Collectors.groupingBy(ContentPoolTypeDTO::getPoolType));
|
|
|
List<LongArticleTitleAudit> auditList = titleAuditRepository.getByAuditTimestampBetween(timestamp, timestamp + 86400000);
|
|
|
List<LongArticleCrawlerVideo> crawlerVideoList = crawlerVideoRepository.getByAuditTimestampBetween(timestamp, timestamp + 86400000);
|
|
|
Map<String, List<LongArticleCrawlerVideo>> crawlerVideoMap = crawlerVideoList.stream()
|
|
@@ -2022,6 +2028,12 @@ public class DataDashboardService {
|
|
|
List<ContentPoolTypeDTO> poolTypeDTOS = aigcBaseMapper.getContentPoolType(contentIds);
|
|
|
Map<String, ContentPoolTypeDTO> poolTypeMap = poolTypeDTOS.stream().collect(Collectors.toMap(ContentPoolTypeDTO::getContentId, o -> o));
|
|
|
Map<String, VideoAuditExport> map = new HashMap<>();
|
|
|
+ waitingAuditPoolTypeMap.keySet().forEach(key -> {
|
|
|
+ VideoAuditExport videoAuditExport = new VideoAuditExport();
|
|
|
+ videoAuditExport.setDateStr(dateStr);
|
|
|
+ videoAuditExport.setPoolType(key);
|
|
|
+ map.put(key, videoAuditExport);
|
|
|
+ });
|
|
|
for (LongArticleTitleAudit titleAudit : auditList) {
|
|
|
ContentPoolTypeDTO poolTypeDTO = poolTypeMap.get(titleAudit.getContentId());
|
|
|
if (!map.containsKey(poolTypeDTO.getPoolType())) {
|
|
@@ -2046,11 +2058,15 @@ public class DataDashboardService {
|
|
|
}
|
|
|
for (Map.Entry<String, VideoAuditExport> entry : map.entrySet()) {
|
|
|
VideoAuditExport videoAuditExport = entry.getValue();
|
|
|
+ List<ContentPoolTypeDTO> watingAuditList = waitingAuditPoolTypeMap.get(videoAuditExport.getPoolType());
|
|
|
videoAuditExport.setPoolType(ContentPoolEnum.from(videoAuditExport.getPoolType()).getDescription());
|
|
|
if (videoAuditExport.getVideoAuditCount() > 0) {
|
|
|
videoAuditExport.setArticleAuditPassRate(
|
|
|
videoAuditExport.getArticleAuditPassCount() * 1.0 / videoAuditExport.getArticleAuditCount());
|
|
|
}
|
|
|
+ if (CollectionUtils.isNotEmpty(watingAuditList)) {
|
|
|
+ videoAuditExport.setWaitingAuditCount(watingAuditList.size());
|
|
|
+ }
|
|
|
result.add(videoAuditExport);
|
|
|
}
|
|
|
// sum
|
|
@@ -2063,6 +2079,7 @@ public class DataDashboardService {
|
|
|
VideoAuditExport sum = new VideoAuditExport();
|
|
|
sum.setDateStr(dateStr);
|
|
|
sum.setPoolType("SUM");
|
|
|
+ sum.setWaitingAuditCount(waitingAuditList.size());
|
|
|
sum.setArticleAuditCount(articleAuditCount);
|
|
|
sum.setArticleAuditPassCount(articleAuditPassCount);
|
|
|
sum.setVideoAuditCount(videoAuditCount);
|