Преглед изворни кода

修改添加小程序审核时间

xueyiming пре 5 дана
родитељ
комит
44de61c6ec

+ 9 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/job/NewMatchVideoJob.java

@@ -5,6 +5,7 @@ import cn.hutool.http.HttpResponse;
 import com.tzld.piaoquan.longarticle.common.enums.MatchResultStatusEnum;
 import com.tzld.piaoquan.longarticle.common.enums.NewContentStatusEnum;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.NewMatchVideoMapper;
+import com.tzld.piaoquan.longarticle.model.dto.AuditContentRequest;
 import com.tzld.piaoquan.longarticle.model.po.longarticle.NewMatchVideo;
 import com.tzld.piaoquan.longarticle.model.po.longarticle.NewMatchVideoExample;
 import com.tzld.piaoquan.longarticle.model.vo.MatchContentItem;
@@ -12,6 +13,7 @@ import com.tzld.piaoquan.longarticle.model.vo.MatchContentStatusParam;
 import com.tzld.piaoquan.longarticle.service.local.NewMatchVideoService;
 import com.tzld.piaoquan.longarticle.service.local.impl.MatchVideoServiceImpl;
 import com.tzld.piaoquan.longarticle.service.remote.AigcService;
+import com.tzld.piaoquan.longarticle.service.remote.MatchService;
 import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -38,6 +40,9 @@ public class NewMatchVideoJob {
     @Autowired
     private NewMatchVideoMapper newMatchVideoMapper;
 
+    @Autowired
+    private MatchService matchService;
+
     @XxlJob("matchContentJob")
     public ReturnT<String> matchContentJob(String param) {
         List<MatchContentItem> matchContentItemList = aigcService.getMatchContentItemList();
@@ -57,6 +62,10 @@ public class NewMatchVideoJob {
                     matchContentStatusParam.setProduceContentId(newMatchVideo.getContentId());
                     matchContentStatusParam.setStatus(MatchResultStatusEnum.SUCCESS.getStatusCode());
                     aigcService.updateMatchContentStatus(matchContentStatusParam);
+                    AuditContentRequest auditContentRequest = new AuditContentRequest();
+                    auditContentRequest.setContentId(newMatchVideo.getContentId());
+                    auditContentRequest.setFlowPoolLevel(newMatchVideo.getFlowPoolLevel());
+                    matchService.addAudit(auditContentRequest);
                 }
                 if (NewContentStatusEnum.isFail(newMatchVideo.getContentStatus())) {
                     MatchContentStatusParam matchContentStatusParam = new MatchContentStatusParam();

+ 5 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -10,6 +10,7 @@ import com.tzld.piaoquan.longarticle.dao.mapper.crawler.FwhDailyPublishDetailMap
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.*;
 import com.tzld.piaoquan.longarticle.model.bo.MatchContent;
 import com.tzld.piaoquan.longarticle.model.bo.VideoDetail;
+import com.tzld.piaoquan.longarticle.model.dto.AuditContentRequest;
 import com.tzld.piaoquan.longarticle.model.dto.MiniprogramCardRequest;
 import com.tzld.piaoquan.longarticle.model.dto.PublishArticleData;
 import com.tzld.piaoquan.longarticle.model.po.crawler.ArticleUseGroup;
@@ -390,6 +391,10 @@ public class CoreServiceImpl implements CoreService {
                                         statusParam.setPublishContentId(matchContent.getPublishContentId());
                                         aigcService.updateMatchMiniprogramStatus(statusParam);
                                         contentService.addMatchContent(matchVideo, matchContent.getPublishContentId());
+                                        AuditContentRequest auditContentRequest = new AuditContentRequest();
+                                        auditContentRequest.setContentId(matchContent.getSourceId());
+                                        auditContentRequest.setFlowPoolLevel(matchContent.getFlowPoolLevelTag());
+                                        matchService.addAudit(auditContentRequest);
                                         continue;
                                     }
                                     if (ContentStatusEnum.isFail(matchVideo1.getContentStatus())) {

+ 0 - 10
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CrawlerVideoServiceImpl.java

@@ -115,16 +115,6 @@ public class CrawlerVideoServiceImpl {
         }
         boolean pushRes = pushOss(contentId);
         log.info("uploadCrawlerVideo pushRes={} contentId={}", pushRes, contentId);
-        if (pushRes) {
-            AuditContentRequest auditContentRequest = new AuditContentRequest();
-            auditContentRequest.setContentId(contentId);
-            auditContentRequest.setFlowPoolLevel(flowPoolLeve);
-            boolean addAudit = matchService.addAudit(auditContentRequest);
-            if (!addAudit) {
-                LarkRobotUtil.sendMessage("添加审核文章失败 contentId=" + contentId +
-                        " flowPoolLevel=" + flowPoolLeve);
-            }
-        }
         return pushRes;
     }