Jelajahi Sumber

骄阳定时任务修改

yumeng 4 tahun lalu
induk
melakukan
50de660b9f

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -290,3 +290,5 @@ ai:
   callback:
     callback-unit-url: http://192.168.1.193:31012/ai_callback_add_group
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-jiaoyang.yml

@@ -261,3 +261,5 @@ ai:
   callback:
     callback-unit-url: http://139.186.27.96:31012/ai_callback_add_group
     callback-creative-url: http://139.186.27.96:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-prod.yml

@@ -261,3 +261,5 @@ ai:
   callback:
     callback-unit-url: http://139.186.27.96:31012/ai_callback_add_group
     callback-creative-url: http://139.186.27.96:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://api.tjyourong.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-prod2.yml

@@ -253,3 +253,5 @@ ai:
   callback:
     callback-unit-url: http://139.186.27.96:31012/ai_callback_add_group
     callback-creative-url: http://139.186.27.96:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://api.tjyourong.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -250,3 +250,5 @@ ai:
   callback:
     callback-unit-url: http://192.168.1.193:31012/ai_callback_add_group
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 2 - 1
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -248,4 +248,5 @@ ai:
   callback:
     callback-unit-url: http://192.168.1.193:31012/ai_callback_add_group
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
-
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 9 - 4
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAiCreativeJob.java

@@ -9,6 +9,7 @@ import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import java.text.ParseException;
@@ -23,6 +24,10 @@ import java.util.Map;
 @Component
 @Slf4j
 public class KuaishouAiCreativeJob {
+
+    @Value("${xxl-job.requestUrl}")
+    private String jobUrl;
+
     @Autowired
     private IAiKuaishouAdvertiserStrategyService strategyService;
 
@@ -35,7 +40,7 @@ public class KuaishouAiCreativeJob {
         if (null == strategies || strategies.isEmpty()) {
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/customCreativeLimit";
+        String url = jobUrl + "/jeecg-boot/ai/create/customCreativeLimit";
         for (AiKuaishouAdvertiserStrategy strategy : strategies) {
             if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 1) {
                 Map<String, Object> requestMap = new HashMap<>();
@@ -68,7 +73,7 @@ public class KuaishouAiCreativeJob {
             return;
         }
         try {
-            String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/kuaishouCustomCreativeSupplement";
+            String url = jobUrl + "/jeecg-boot/ai/create/kuaishouCustomCreativeSupplement";
             int hour = DateUtils.getNowHour();
             for (AiKuaishouAdvertiserStrategy strategy : strategies) {
                 if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 1) {
@@ -105,7 +110,7 @@ public class KuaishouAiCreativeJob {
         if (null == strategies || strategies.isEmpty()) {
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/kuaishouProgramCreativeAuto";
+        String url = jobUrl + "/jeecg-boot/ai/create/kuaishouProgramCreativeAuto";
         for (AiKuaishouAdvertiserStrategy strategy : strategies) {
             if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 0) {
                 long videoCnt = strategy.getProgramUnitCnt() * 5 / 2;
@@ -141,7 +146,7 @@ public class KuaishouAiCreativeJob {
         if (null == strategies || strategies.isEmpty()) {
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/autoCreateProgramHistoryTopCreative";
+        String url = jobUrl + "/jeecg-boot/ai/create/autoCreateProgramHistoryTopCreative";
         for (AiKuaishouAdvertiserStrategy strategy : strategies) {
             if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 0) {
                 long videoCnt = strategy.getProgramUnitCnt() * 5 / 2;

+ 4 - 1
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouCreateUnitJob.java

@@ -6,6 +6,7 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupTemplateService;
 import com.xxl.job.core.context.XxlJobHelper;
 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.HashMap;
@@ -18,6 +19,8 @@ public class KuaishouCreateUnitJob {
 
     @Autowired
     private IKuaiShouGroupTemplateService groupTemplateService;
+    @Value("${xxl-job.requestUrl}")
+    private String jobUrl;
 
     @XxlJob("kuaihouCreateUnit")
     public void execute() {
@@ -27,7 +30,7 @@ public class KuaishouCreateUnitJob {
             XxlJobHelper.log("批量2.0暂时没有未创建的组");
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/batch/kuaiShouGroupTemplate/createUnit";
+        String url = jobUrl + "/jeecg-boot/batch/kuaiShouGroupTemplate/createUnit";
         for (int i = 0; i < idList.size(); i++) {
             Long id = idList.get(i);
             Map<String, Object> requestMap = new HashMap<>();

+ 5 - 0
module-job-kuaishou/src/main/resources/application-dev.yml

@@ -183,6 +183,7 @@ bytedance:
     ad-report-get: /2/report/ad/get/
     ad-creative-get: /2/report/creative/get/
     advertiser-fund-daily-stat: /2/advertiser/fund/daily_stat/
+
 xxl:
   job:
     accessToken:
@@ -194,4 +195,8 @@ xxl:
       logretentiondays: 30
     admin:
       addresses: 127.0.0.1:8090/xxl-job-admin/
+xxl-job:
+  requestUrl: http://localhost:8080
+
+
 

+ 5 - 1
module-job-kuaishou/src/main/resources/application-jiaoyang.yml

@@ -234,4 +234,8 @@ ai:
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
 zip:
   local:
-    download-path: /data/unzip/
+    download-path: /data/unzip/
+xxl-job:
+    requestUrl: http://jiaoyangapi.shyouteng.com.cn
+
+

+ 3 - 1
module-job-kuaishou/src/main/resources/application-prod.yml

@@ -234,4 +234,6 @@ ai:
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
 zip:
   local:
-    download-path: /data/unzip/
+    download-path: /data/unzip/
+xxl-job:
+  requestUrl: http://api.tjyourong.com.cn

+ 4 - 0
module-job-kuaishou/src/main/resources/application-test.yml

@@ -212,3 +212,7 @@ xxl:
       logretentiondays: 30
     admin:
       addresses: http://127.0.0.1:8090/xxl-job-admin
+xxl-job:
+  requestUrl:
+
+