|
@@ -4,7 +4,6 @@ import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.HttpUtils2;
|
|
import cn.com.ctop.common.module.utils.HttpUtils2;
|
|
import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAdvertiserStrategy;
|
|
import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAdvertiserStrategy;
|
|
import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAdvertiserStrategyService;
|
|
import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAdvertiserStrategyService;
|
|
-import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouCreateCreativeService;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -72,20 +71,22 @@ public class KuaishouAiCreativeJob {
|
|
String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/kuaishouCustomCreativeSupplement";
|
|
String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/kuaishouCustomCreativeSupplement";
|
|
int hour = DateUtils.getNowHour();
|
|
int hour = DateUtils.getNowHour();
|
|
for (AiKuaishouAdvertiserStrategy strategy : strategies) {
|
|
for (AiKuaishouAdvertiserStrategy strategy : strategies) {
|
|
- Map<String, Object> requestMap = new HashMap<>();
|
|
|
|
- requestMap.put("id", strategy.getId());
|
|
|
|
- requestMap.put("hour", hour);
|
|
|
|
- String result = HttpUtils2.httpGet(url, requestMap, null);
|
|
|
|
- JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
|
- if (!Check.isNull(jsonObject)) {
|
|
|
|
- Integer code = jsonObject.getInteger("code");
|
|
|
|
- if (code == 0) {
|
|
|
|
- log.info("快手创意补充异步执行中,accountId:{}", strategy.getAccountId());
|
|
|
|
|
|
+ if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 1) {
|
|
|
|
+ Map<String, Object> requestMap = new HashMap<>();
|
|
|
|
+ requestMap.put("id", strategy.getId());
|
|
|
|
+ requestMap.put("hour", hour);
|
|
|
|
+ String result = HttpUtils2.httpGet(url, requestMap, null);
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
|
+ if (!Check.isNull(jsonObject)) {
|
|
|
|
+ Integer code = jsonObject.getInteger("code");
|
|
|
|
+ if (code == 0) {
|
|
|
|
+ log.info("快手创意补充异步执行中,accountId:{}", strategy.getAccountId());
|
|
|
|
+ } else {
|
|
|
|
+ log.error("快手创意补充异步执行失败,accountId:{}", strategy.getAccountId());
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- log.error("快手创意补充异步执行失败,accountId:{}", strategy.getAccountId());
|
|
|
|
|
|
+ log.error("快手创意补充返回结果为空,accountId:{}", strategy.getAccountId());
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- log.error("快手创意补充返回结果为空,accountId:{}", strategy.getAccountId());
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|