Browse Source

长文审核流程优化

wangyunpeng 5 days ago
parent
commit
74c07a3f0a

+ 0 - 34
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleVideoAuditService.java

@@ -3,7 +3,6 @@ package com.tzld.longarticle.recommend.server.service.recommend;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
-import com.tzld.longarticle.recommend.server.common.enums.aigc.PublishContentStatusEnum;
 import com.tzld.longarticle.recommend.server.common.enums.longArticle.ArticleVideoAuditStatusEnum;
 import com.tzld.longarticle.recommend.server.common.enums.recommend.ContentPoolEnum;
 import com.tzld.longarticle.recommend.server.mapper.aigc.AigcBaseMapper;
@@ -215,13 +214,6 @@ public class ArticleVideoAuditService {
         titleAudit.setAuditAccount(param.getAuditAccount());
         titleAudit.setAuditTimestamp(now);
         titleAuditRepository.save(titleAudit);
-        if (param.getStatus() == 2) {
-            // 审核不通过
-            auditArticleReject(titleAudit);
-        } else {
-            // 审核通过
-            auditArticlePass(titleAudit);
-        }
         // 当日审核数+1
         addAuditCount(titleAudit.getFlowPoolLevel());
     }
@@ -233,32 +225,6 @@ public class ArticleVideoAuditService {
         redisTemplate.opsForValue().set(key, String.valueOf(totalCount + 1), 24, TimeUnit.HOURS);
     }
 
-    private void auditArticlePass(LongArticleTitleAudit titleAudit) {
-        // publish_content
-        publishContentMapper.updatePublishContentStatus(titleAudit.getContentId(),
-                PublishContentStatusEnum.waiting_publish.getVal(),
-                PublishContentStatusEnum.gzh_article_deprecated.getVal());
-    }
-
-    private void auditArticleReject(LongArticleTitleAudit titleAudit) {
-        // reMatch 暂时取消
-//        List<LongArticleCrawlerVideo> videoList = crawlerVideoRepository.getByContentIdAndIsIllegal(titleAudit.getContentId(), 1);
-//        if (CollectionUtils.isNotEmpty(videoList)) {
-//            for (LongArticleCrawlerVideo video : videoList) {
-//                ArticleReMatchRecord reMatchRecord = new ArticleReMatchRecord();
-//                reMatchRecord.setContentId(titleAudit.getContentId());
-//                reMatchRecord.setOssPath(video.getVideoOssPath());
-//                reMatchRecord.setStatus(0);
-//                reMatchRecord.setCreateTimestamp(System.currentTimeMillis() / 1000);
-//                articleReMatchRecordRepository.save(reMatchRecord);
-//            }
-//        }
-        // publish_content
-        publishContentMapper.updatePublishContentStatus(titleAudit.getContentId(),
-                PublishContentStatusEnum.gzh_article_deprecated.getVal(),
-                PublishContentStatusEnum.waiting_publish.getVal());
-    }
-
     public void auditVideo(VideoAuditParam param) {
         LongArticleCrawlerVideo video = crawlerVideoRepository.getById(param.getVideoId());
         Long now = System.currentTimeMillis();

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

@@ -2337,6 +2337,9 @@ public class DataDashboardService {
         Long produceCount = aigcBaseMapper.getProduceContentCountByProducePlanIds(producePlanIds, start, end);
         List<Integer> auditStatus = new ArrayList<>();
         auditStatus.add(1);
+        auditStatus.add(4);
+        auditStatus.add(5);
+        auditStatus.add(6);
         Long produceAuditPassCount = aigcBaseMapper.getProduceAuditPassCountByProducePlanIds(producePlanIds, auditStatus, start, end);
         auditStatus.add(2);
         Long produceAuditCount = aigcBaseMapper.getProduceAuditPassCountByProducePlanIds(producePlanIds, auditStatus, start, end);
@@ -2490,6 +2493,9 @@ public class DataDashboardService {
             Long produceCount = aigcBaseMapper.getProduceContentCountByProducePlanIdsAndChannel(producePlanIds, start, end, channel.getVal());
             List<Integer> auditStatus = new ArrayList<>();
             auditStatus.add(1);
+            auditStatus.add(4);
+            auditStatus.add(5);
+            auditStatus.add(6);
             Long produceAuditPassCount = aigcBaseMapper.getProduceAuditPassCountByProducePlanIdsAndChannel(producePlanIds, auditStatus, start, end, channel.getVal());
             auditStatus.add(2);
             Long produceAuditCount = aigcBaseMapper.getProduceAuditPassCountByProducePlanIdsAndChannel(producePlanIds, auditStatus, start, end, channel.getVal());
@@ -2553,6 +2559,9 @@ public class DataDashboardService {
             }
             List<Integer> auditStatus = new ArrayList<>();
             auditStatus.add(1);
+            auditStatus.add(4);
+            auditStatus.add(5);
+            auditStatus.add(6);
             Long produceAuditPassCount = aigcBaseMapper.getVideoPoolPlatformProduceAuditPassCount(producePlanIds, auditStatus, start, end, videoType.getPlatform());
             auditStatus.add(2);
             Long produceAuditCount = aigcBaseMapper.getVideoPoolPlatformProduceAuditPassCount(producePlanIds, auditStatus, start, end, videoType.getPlatform());

+ 7 - 7
long-article-recommend-service/src/main/resources/mapper/aigc/AigcBaseMapper.xml

@@ -32,7 +32,7 @@
         from produce_plan_exe_record record
          join produce_plan_module_output output
           on record.plan_exe_id = output.plan_exe_id and output.produce_module_type = 3
-        where record.plan_id = #{planId} and record.status = 2 and audit_status = 1
+        where record.plan_id = #{planId} and record.status = 2 and audit_status in (1, 4, 5, 6)
     </select>
 
     <select id="getAllByProducePlanId"
@@ -80,7 +80,7 @@
         <foreach collection="planIds" item="item" open="(" close=")" separator=",">
             #{item}
         </foreach>
-        and ((pper.audit_status in (1, 2) and pper.audit_timestamp between #{timeStart} and #{timeEnd})
+        and ((pper.audit_status in (1, 2, 4, 5, 6) and pper.audit_timestamp between #{timeStart} and #{timeEnd})
                  or (prr.review_status = 0 and pper.create_timestamp &lt; #{timeStart} and pper.status = 6))
         GROUP BY pper.plan_id, pper.audit_status
     </select>
@@ -108,7 +108,7 @@
           and record.audit_timestamp between #{startTimeStamp} and #{endTimeStamp}
           and atom.output >= 7
           and record.status in (2, 6, 9)
-          and record.audit_status in (1, 3)
+          and record.audit_status in (1, 3, 4, 5, 6)
         order by record.audit_timestamp desc
     </select>
 
@@ -124,7 +124,7 @@
             #{item}
         </foreach>
         and record.status in (2, 6, 9)
-        and record.audit_status in (1, 3)
+        and record.audit_status in  in (1, 3, 4, 5, 6)
         order by record.audit_timestamp desc
     </select>
 
@@ -277,7 +277,7 @@
     </select>
 
     <select id="getBadAccountList" resultType="com.tzld.longarticle.recommend.server.model.dto.aigc.BadCrawlerAccountDTO">
-        select account_name, count(if(audit_status = 1, 1, null)) / count(1) as rate, count(1) as total_count
+        select account_name, count(if(audit_status IN (1, 4, 5, 6), 1, null)) / count(1) as rate, count(1) as total_count
         from (
              select  audit_status,
                      e.account_name
@@ -289,7 +289,7 @@
                  <foreach collection="producePlanIds" item="item" open="(" close=")" separator=",">
                      #{item}
                  </foreach>
-               and a.audit_status in (1, 2)
+               and a.audit_status in (1, 2, 4, 5, 6)
                and a.update_timestamp > unix_timestamp('2024-09-01')
              ) t1
         group by account_name
@@ -422,7 +422,7 @@
         left join (select audit_account, count(1) as cnt
                 from produce_plan_exe_record
                 where audit_timestamp between #{startTimeStamp} and #{endTimeStamp}
-                  and audit_status = 1
+                  and audit_status in (1, 4, 5, 6)
                 group by audit_account) auditPass
         on audit.audit_account = auditPass.audit_account
         where audit.audit_account != 'wangyunpeng'