|
@@ -0,0 +1,38 @@
|
|
|
|
|
+package cn.com.ctop.job.adq.handler;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+import cn.com.ctop.job.adq.data.utils.HttpUtils;
|
|
|
|
|
+import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
|
|
+import java.util.concurrent.Executors;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 定时更新
|
|
|
|
|
+ */
|
|
|
|
|
+@Slf4j
|
|
|
|
|
+@Component
|
|
|
|
|
+public class ToolsSiteJob {
|
|
|
|
|
+
|
|
|
|
|
+ private static ExecutorService reviewExecutorService = Executors.newFixedThreadPool(3);
|
|
|
|
|
+
|
|
|
|
|
+ private final String KEY = "bb3648b0b93f2f82135a6dac38dc418f808346a434";
|
|
|
|
|
+
|
|
|
|
|
+ @XxlJob("regularReview")
|
|
|
|
|
+ public void regularReview() throws Exception {
|
|
|
|
|
+ try {
|
|
|
|
|
+ log.info("[定时催评] 任务启动...");
|
|
|
|
|
+ //定期更新短剧审核信息
|
|
|
|
|
+ String url = "https://api.cms.artlinkworld.cn/script/review/regularReview";
|
|
|
|
|
+ HttpUtils.httpGet(String.format("%s?platform=1&id=%s", url, KEY), null, null);
|
|
|
|
|
+ log.info("[定时催评] 执行完成");
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("[定时催评] 执行异常");
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|