Bladeren bron

Merge branch 'dev-xym-new-cover' of Server/long-article-manage into master

xueyiming 2 weken geleden
bovenliggende
commit
b19067f430

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

@@ -1,6 +1,7 @@
 package com.tzld.piaoquan.longarticle.job;
 
 import com.tzld.piaoquan.longarticle.service.local.CoreService;
+import com.tzld.piaoquan.longarticle.service.local.CoverService;
 import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -16,6 +17,9 @@ public class PlanAccountJob {
     @Autowired
     private CoreService coreService;
 
+    @Autowired
+    private CoverService coverService;
+
     @Autowired
     private RedisTemplate<String, Object> redisTemplate;
 
@@ -74,4 +78,15 @@ public class PlanAccountJob {
         }
         return ReturnT.SUCCESS;
     }
+
+    @XxlJob("getEffectiveVideoJob")
+    public ReturnT<String> getEffectiveVideo(String param) {
+        try {
+            coverService.getEffectiveVideo();
+        } catch (Exception e) {
+            LarkRobotUtil.sendMessage("长文系统查询可用视频失败");
+            log.error("getEffectiveVideo error", e);
+        }
+        return ReturnT.SUCCESS;
+    }
 }