wangyunpeng 7 ماه پیش
والد
کامیت
2fa716ba10

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

@@ -288,6 +288,7 @@ public class DataFlushService {
         Map<String, LongArticlesText> kimiTitleMap = kimiTitleList.stream().collect(
                 Collectors.toMap(LongArticlesText::getContentId, o -> o, (existing, replacement) -> replacement));
         List<LongArticlesText> updateList = longArticleBaseMapper.getNeedUpdateRecords();
+        int updateNum = 0;
         for (LongArticlesText update : updateList) {
             LongArticlesText kimi = kimiTitleMap.get(update.getContentId());
             if (Objects.nonNull(kimi)) {
@@ -297,7 +298,9 @@ public class DataFlushService {
                     update.setKimiKeys(kimi.getKimiKeys());
                     longArticleBaseMapper.updateLongArticlesText(update);
                 });
+                updateNum++;
             }
         }
+        log.info("flushLongArticlesText updateNum:{}", updateNum);
     }
 }

+ 2 - 2
long-article-recommend-service/src/main/resources/mapper/crawler/CrawlerBaseMapper.xml

@@ -29,11 +29,11 @@
         select * from article_match_videos order by video_id
     </select>
     <select id="countLongArticlesVideos" resultType="java.lang.Integer">
-        select count(1) from long_articles_video where content_status = 2 and success = 1
+        select count(1) from long_articles_video where content_status = 2 and success = 0
     </select>
     <select id="pageLongArticlesVideos"
             resultType="com.tzld.longarticle.recommend.server.model.dto.LongArticlesVideo">
-        select * from long_articles_video where content_status = 2 and success = 1 and id > #{id} order by id limit #{pageSize}
+        select * from long_articles_video where content_status = 2 and success = 0 and id > #{id} order by id limit #{pageSize}
     </select>
     <select id="getLongArticlesText" resultType="com.tzld.longarticle.recommend.server.model.dto.LongArticlesText">
         select content_id, kimi_title, kimi_summary, kimi_keys from long_articles_video where kimi_summary is not null group by content_id