Sfoglia il codice sorgente

文章溯源修改

wangyunpeng 7 mesi fa
parent
commit
082edf1467

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

@@ -16,4 +16,6 @@ public interface ArticlePoolPromotionSourceRepository extends JpaRepository<Arti
     List<ArticlePoolPromotionSource> getByChannelContentIdInAndStatusAndDeleted(List<String> channelContentIds, Integer status, Integer deleted);
 
     List<ArticlePoolPromotionSource> getByStatusAndDeleted(Integer status, Integer deleted);
+
+    List<ArticlePoolPromotionSource> getByStatusAndDeletedAndWxSnIsNotNull(Integer status, Integer deleted);
 }

+ 2 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleService.java

@@ -280,7 +280,7 @@ public class ArticleService {
             ArticlePoolPromotionSource item = articlePoolPromotionSourceRepository.getByChannelContentId(channelContentId);
             tasks.add(item);
         } else {
-            tasks = articlePoolPromotionSourceRepository.getByStatusAndDeleted(0, 0);
+            tasks = articlePoolPromotionSourceRepository.getByStatusAndDeletedAndWxSnIsNotNull(0, 0);
         }
         long now = System.currentTimeMillis();
         for (ArticlePoolPromotionSource task : tasks) {
@@ -308,7 +308,7 @@ public class ArticleService {
                 articlePoolPromotionSourceRepository.save(task);
                 continue;
             }
-            RootPublishContentVO source = getRootPublishContent(publishContent.getCrawlerChannelContentId(), null, publishContent.getId(), null, 0);
+            RootPublishContentVO source = getRootPublishContent(publishContent.getCrawlerChannelContentId(), null, publishContent.getId(), publishContent.getSourceId(), 0);
             // 更新
             if (StringUtils.hasText(source.getRootProduceContentId())) {
                 task.setStatus(ArticlePoolPromotionSourceStatusEnum.FINISH.getCode());