浏览代码

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

xueyiming 2 周之前
父节点
当前提交
b19067f430
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/job/PlanAccountJob.java

+ 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;
 package com.tzld.piaoquan.longarticle.job;
 
 
 import com.tzld.piaoquan.longarticle.service.local.CoreService;
 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.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -16,6 +17,9 @@ public class PlanAccountJob {
     @Autowired
     @Autowired
     private CoreService coreService;
     private CoreService coreService;
 
 
+    @Autowired
+    private CoverService coverService;
+
     @Autowired
     @Autowired
     private RedisTemplate<String, Object> redisTemplate;
     private RedisTemplate<String, Object> redisTemplate;
 
 
@@ -74,4 +78,15 @@ public class PlanAccountJob {
         }
         }
         return ReturnT.SUCCESS;
         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;
+    }
 }
 }