Forráskód Böngészése

视频内容池违规处理

wangyunpeng 6 hónapja
szülő
commit
06798b7b6b

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

@@ -78,4 +78,6 @@ public interface LongArticleBaseMapper {
     void updateArticleCategory(String title, String category);
 
     void updateDatastatScoreCategory(String title, String category);
+
+    void updateVideoPoolContentBad(String contentTraceId);
 }

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

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
 import com.alibaba.fastjson.JSONArray;
 import com.google.common.collect.Lists;
 import com.tzld.longarticle.recommend.server.common.enums.StatusEnum;
+import com.tzld.longarticle.recommend.server.common.enums.aigc.PublishPlanInputSourceTypesEnum;
 import com.tzld.longarticle.recommend.server.common.enums.aigc.PushTypeEnum;
 import com.tzld.longarticle.recommend.server.common.enums.cgi.PQVideoAuditResultEnum;
 import com.tzld.longarticle.recommend.server.common.enums.cgi.PQVideoSensitiveLevelEnum;
@@ -363,6 +364,15 @@ public class ArticleAuditService {
         if (CollectionUtils.isEmpty(publishContents)) {
             return;
         }
+        // 处理视频内容池内容
+        List<PublishContentDTO> videoPoolContents = publishContents.stream()
+               .filter(o -> Objects.equals(o.getSourceType(), PublishPlanInputSourceTypesEnum.longArticleVideoPoolSource.getVal()))
+               .collect(Collectors.toList());
+        if (CollectionUtils.isNotEmpty(videoPoolContents)) {
+            for (PublishContentDTO videoPoolContent : videoPoolContents) {
+                longArticleBaseMapper.updateVideoPoolContentBad(videoPoolContent.getSourceId());
+            }
+        }
         // 查找该生成内容下所有已发布内容
         List<String> sourceIds = publishContents.stream().map(PublishContentDTO::getSourceId).distinct().collect(Collectors.toList());
         publishContents = aigcBaseMapper.getPublishContentBySourceIdIn(sourceIds);

+ 4 - 0
long-article-recommend-service/src/main/resources/mapper/longArticle/LongArticleBaseMapper.xml

@@ -292,4 +292,8 @@
         where title = #{title} and category != #{category};
     </update>
 
+    <update id="updateVideoPoolContentBad">
+        update publish_single_video_source set bad_status = 1 where content_trace_id = #{contentTraceId};
+    </update>
+
 </mapper>