Explorar el Código

Merge branch 'dev-xym-update-match-video' of Server/long-article-manage into master

xueyiming hace 4 días
padre
commit
21af990e18

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

@@ -9,6 +9,7 @@ import com.tzld.piaoquan.longarticle.model.po.longarticle.*;
 import com.tzld.piaoquan.longarticle.service.remote.MatchService;
 import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
 import com.tzld.piaoquan.longarticle.utils.other.*;
+import com.tzld.piaoquan.longarticle.utils.page.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -279,6 +280,7 @@ public class CrawlerVideoServiceImpl {
         CrawlerVideoExample example = new CrawlerVideoExample();
         example.createCriteria().andContentIdEqualTo(contentId).andDownloadStatusEqualTo(0);
         example.setOrderByClause("score desc");
+        example.setPage(new Page(1,MAX_NUM));
         List<CrawlerVideo> crawlerVideoList = crawlerVideoMapper.selectByExampleWithBLOBs(example);
         if (CollectionUtils.isEmpty(crawlerVideoList)) {
             return false;

+ 2 - 1
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/NewMatchVideoServiceImpl.java

@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
+import java.util.Date;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
@@ -128,7 +129,7 @@ public class NewMatchVideoServiceImpl implements NewMatchVideoService {
 
         video.setContentStatus(newStatus);
         video.setRetryCount(retryCount);
-
+        video.setUpdateTime(new Date());
         try {
             newMatchVideoMapper.updateByPrimaryKeySelective(video);
         } catch (Exception e) {