Bladeren bron

Merge branch 'master' into wyp/0212-testCode

wangyunpeng 4 maanden geleden
bovenliggende
commit
987e7d73c6

+ 2 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/mapper/longArticle/LongArticleBaseMapper.java

@@ -78,6 +78,8 @@ public interface LongArticleBaseMapper {
 
     Long countMatchSuccessCount(Date start, Date end);
 
+    Long countMatchCount(Date start, Date end);
+
     void batchInsertLongArticleAuditDelete(List<LongArticleAuditDelete> deleteList);
 
     List<String> getPassContentIds();

+ 7 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/DataDashboardService.java

@@ -2120,7 +2120,8 @@ public class DataDashboardService {
         List<Pair<String, String>> styles = Arrays
                 .asList(
                         Pair.of("G", "0.00%"),
-                        Pair.of("K", "0.00%")
+                        Pair.of("J", "0.00%"),
+                        Pair.of("M", "0.00%")
                 );
         doSendFeishuSheet(dateStrList, dailyDetailSheetToken, "qEipyL", rowNum, rows,
                 2, styles, null);
@@ -2160,6 +2161,7 @@ public class DataDashboardService {
         Date dateStart = DateUtils.getStartDateOfDay(start / 1000);
         Date dateEnd = DateUtils.getStartDateOfDay(end / 1000);
         Long matchSuccessCount = longArticleBaseMapper.countMatchSuccessCount(dateStart, dateEnd);
+        Long matchCount = longArticleBaseMapper.countMatchCount(dateStart, dateEnd);
         Long videoAuditPassCount = longArticleTitleAuditRepository.countByStatusAndAuditTimestampBetween(
                 1, start, end);
         Long videoAuditCount = longArticleTitleAuditRepository.countByAuditTimestampBetween(start, end);
@@ -2174,6 +2176,10 @@ public class DataDashboardService {
             result.setProduceAuditPassRate(produceAuditPassCount * 1.0 / produceAuditCount);
         }
         result.setMatchSuccessCount(matchSuccessCount);
+        result.setMatchCount(matchCount);
+        if (matchCount > 0) {
+            result.setMatchSuccessRate(matchSuccessCount * 1.0 / matchCount);
+        }
         result.setVideoAuditPassCount(videoAuditPassCount);
         result.setVideoAuditCount(videoAuditCount);
         if (videoAuditCount > 0) {

+ 9 - 3
long-article-recommend-service/src/main/resources/mapper/longArticle/LongArticleBaseMapper.xml

@@ -272,9 +272,15 @@
     </select>
 
     <select id="countMatchSuccessCount" resultType="java.lang.Long">
-        select count(distinct content_id)
-        from long_articles_crawler_videos
-        where crawler_time between #{start} and #{end}
+        select count(content_id)
+        from long_articles_text
+        where start_processing_time between #{start} and #{end} and result_status = 1
+    </select>
+
+    <select id="countMatchCount" resultType="java.lang.Long">
+        select count(content_id)
+        from long_articles_text
+        where start_processing_time between #{start} and #{end}
     </select>
 
     <select id="getPassContentIds" resultType="java.lang.String">