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