Ver Fonte

Merge branch 'wyp/0314-autoPass' of Server/long-article-recommend into master

wangyunpeng há 3 meses atrás
pai
commit
67c0e6a237

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

@@ -403,9 +403,13 @@ public class ArticleVideoAuditService {
             if (Objects.nonNull(exeRecord)) {
                 String channelContentId = exeRecord.getChannelContentId();
                 ArticlePoolPromotionSource source = articlePoolPromotionSourceRepository.getByChannelContentId(channelContentId);
-                if (Objects.nonNull(source) && source.getStatus() == 1 && source.getDeleted() == 0) {
-                    status = ArticleVideoAuditStatusEnum.PASS.getCode();
-                    auditAccount = "sys";
+                if (Objects.nonNull(source) && source.getStatus() == 1 && source.getDeleted() == 0
+                        && StringUtils.hasText(source.getRootProduceContentId())) {
+                    LongArticleTitleAudit titleAudit = titleAuditRepository.getByContentId(source.getRootProduceContentId());
+                    if (Objects.nonNull(titleAudit) && titleAudit.getStatus() == ArticleVideoAuditStatusEnum.PASS.getCode()) {
+                        status = ArticleVideoAuditStatusEnum.PASS.getCode();
+                        auditAccount = "sys";
+                    }
                 }
             }
         }