Prechádzať zdrojové kódy

自动投放_定时任务

zhaoxian 3 rokov pred
rodič
commit
780c9bc801

+ 15 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAccountAutoCreativeJob.java

@@ -23,6 +23,21 @@ public class KuaishouAccountAutoCreativeJob {
 
 
     /**
+     * 自动投放账户_素材清洗
+     */
+    @XxlJob("kuaishouAccountAutoVideos")
+    public void kuaishouAccountAutoVideos() {
+        List<Long> accountIds = strategyService.getKuaishouAccountAutoStrategy();
+        if (null == accountIds || accountIds.isEmpty()) {
+            return;
+        }
+        accountIds.forEach(accountId -> {
+            String url = jobUrl + "/jeecg-boot/auto/aiKuaishouAccountAutoVideo/insertAutoVideo?accountId=" + accountId;
+            HttpUtils.httpGet(url, null, null);
+        });
+    }
+
+    /**
      * 创建自定义上新广告创意 、频率 20分钟/次
      */
 

+ 0 - 54
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAccountAutoVideoJob.java

@@ -1,54 +0,0 @@
-/*
-package cn.com.ctop.job.kuaishou.handler;
-
-import cn.com.ctop.alarm.modules.entity.RuleAccountTemplate;
-import cn.com.ctop.common.module.utils.Check;
-import cn.com.ctop.common.module.utils.HttpUtils;
-import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAdvertiserStrategyService;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-*/
-
-import cn.com.ctop.common.module.utils.HttpUtils;
-import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAdvertiserStrategyService;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * 自动投放账户_素材
- */
-
-@Component
-public class KuaishouAccountAutoVideoJob {
-
-    @Value("${xxl-job.requestUrl}")
-    private String jobUrl;
-
-    @Autowired
-    private IAiKuaishouAdvertiserStrategyService strategyService;
-
-    @XxlJob("kuaishouAccountAutoVideos")
-    public void kuaishouAccountAutoVideos() {
-        List<Long> accountIds = strategyService.getKuaishouAccountAutoStrategy();
-        if (null == accountIds || accountIds.isEmpty()) {
-            return;
-        }
-        accountIds.forEach(accountId -> {
-            String url = jobUrl + "/jeecg-boot/auto/aiKuaishouAccountAutoVideo/insertAutoVideo?accountId=" + accountId;
-            HttpUtils.httpGet(url, null, null);
-        });
-    }
-}
-