|
@@ -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;
|