|
@@ -9,21 +9,23 @@ import cn.com.ctop.common.module.vo.ResFileDTO;
|
|
|
import cn.com.ctop.crawler.modules.core.entity.CrawlerDouyinMusicTask;
|
|
|
import cn.com.ctop.crawler.modules.core.service.CrawlerDouyinMusicTaskService;
|
|
|
import cn.com.ctop.crawler.modules.douyin.service.DouyinMusicService;
|
|
|
+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.IAiKuaishouCreateCreativeService;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouTemplate;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.*;
|
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
|
import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAccessToken;
|
|
|
import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
|
|
|
-import cn.com.ctop.kuaishou.modules.report.service.*;
|
|
|
+import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
|
|
|
+import cn.com.ctop.kuaishou.modules.report.service.IKuaishouAudienceReportDailyService;
|
|
|
import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
|
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
|
|
|
import cn.com.ctop.toutiao.modules.material.service.IBytedanceEffectVideoInfoService;
|
|
|
-import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialDailyMapper;
|
|
|
import cn.com.ctop.toutiao.modules.report.service.*;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
@@ -31,12 +33,7 @@ import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.quartz.JobExecutionException;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.io.IOException;
|
|
@@ -96,43 +93,23 @@ public class TestController {
|
|
|
private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
|
|
|
|
|
|
static ExecutorService executorService = Executors.newFixedThreadPool(15);
|
|
|
- static ExecutorService videoService = Executors.newFixedThreadPool(5);
|
|
|
static ExecutorService suzhaoService = Executors.newFixedThreadPool(5);
|
|
|
@Autowired
|
|
|
private IKuaiShouDailyAgentService dailyAgentService;
|
|
|
@Autowired
|
|
|
private IKuaishouTemplateService templateService;
|
|
|
@Autowired
|
|
|
- private IBytedanceAccountReportTaskRecordService reportTaskRecordService;
|
|
|
- @Resource
|
|
|
- private BytedanceReportMaterialDailyMapper bytedanceReportMaterialDailyMapper;
|
|
|
- @Autowired
|
|
|
private ICtopOauthTokenService ctopOauthTokenService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private IBindAccountAuthService bindAccountAuthService;
|
|
|
@Resource
|
|
|
private UserAllocationMapper allocationMapper;
|
|
|
@Autowired
|
|
|
private IBytedanceReportService bytedanceReportService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private IUserAllocationService allocationService;
|
|
|
@Autowired
|
|
|
- private IEtlKuaiShouNewlyService kuaiShouNewlyService;
|
|
|
- static ExecutorService materialExecutorService = Executors.newFixedThreadPool(8);
|
|
|
-
|
|
|
- @Autowired
|
|
|
private ICtopOauthTokenService tokenService;
|
|
|
- @Autowired
|
|
|
- private IEtlKuaiShouGroupDailyReportService etlKuaiShouGroupDailyReportService;
|
|
|
- @Autowired
|
|
|
- private IEtlKuaiShouAccountMaterialOverviewService accountMaterialOverviewService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IEtlKuaiShouNewlyService newlyService;
|
|
|
- @Autowired
|
|
|
- private IKuaishouReportDailyGroupService reportDailyGroupService;
|
|
|
|
|
|
|
|
|
@GetMapping("/cleanNewlyData")
|
|
@@ -298,11 +275,6 @@ public class TestController {
|
|
|
} catch (InterruptedException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
-// bytedanceReportMaterialDailyMapper.updateImageReportCode();
|
|
|
-// bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
|
|
|
-// bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
|
|
|
-// bytedanceReportMaterialDailyMapper.updateImageReportPlaneId();
|
|
|
-// bytedanceReportMaterialDailyMapper.updateImageReportPlaneName();
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
ResultMapUtils.setResultMap(new HashMap<>(), StatusCode.COMMON_SUCCESS);
|
|
|
return result;
|
|
@@ -546,7 +518,6 @@ public class TestController {
|
|
|
|
|
|
QueryWrapper<UserAllocation> userAllocationQueryWrapper = new QueryWrapper<>();
|
|
|
userAllocationQueryWrapper.eq("project_id", projectId);
|
|
|
- // userAllocationQueryWrapper.eq("account_status", 0);
|
|
|
List<UserAllocation> list = userAllocationService.list(userAllocationQueryWrapper);
|
|
|
if (!Check.isNull(list)) {
|
|
|
for (UserAllocation allocation : list) {
|
|
@@ -1277,4 +1248,34 @@ public class TestController {
|
|
|
}));
|
|
|
return Result.ok("success");
|
|
|
}
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAiKuaishouAdvertiserStrategyService strategyService;
|
|
|
+ @Autowired
|
|
|
+ private IAiKuaishouCreateCreativeService createCreativeService;
|
|
|
+ @GetMapping("testCreateCreative")
|
|
|
+ public Map<String,Object>testCreateCreative(Long accountId,Integer createType){
|
|
|
+ Map<String,Object>result = new HashMap<>();
|
|
|
+ AiKuaishouAdvertiserStrategy strategy = strategyService.getByAccountId(accountId);
|
|
|
+ if(strategy == null){
|
|
|
+ ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ createCreativeService.autoCreateCreative(strategy,createType,150);
|
|
|
+ ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("testProgramCreative")
|
|
|
+ public Map<String,Object>testProgramCreative(Long accountId,Integer createType){
|
|
|
+ Map<String,Object>result = new HashMap<>();
|
|
|
+ AiKuaishouAdvertiserStrategy strategy = strategyService.getByAccountId(accountId);
|
|
|
+ if(strategy == null){
|
|
|
+ ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ createCreativeService.autoCreateProgramCreative(strategy, createType,150);
|
|
|
+ ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|