|
@@ -1,60 +1,31 @@
|
|
|
package org.jeecg.modules.ctop.controller;
|
|
|
|
|
|
-import cn.com.ctop.common.module.entity.*;
|
|
|
import cn.com.ctop.common.module.mapper.CtopOauthTokenMapper;
|
|
|
import cn.com.ctop.common.module.mapper.MailLogMapper;
|
|
|
import cn.com.ctop.common.module.mapper.UserAllocationMapper;
|
|
|
import cn.com.ctop.common.module.service.*;
|
|
|
-import cn.com.ctop.common.module.utils.*;
|
|
|
-import cn.com.ctop.common.module.vo.ResFileDTO;
|
|
|
-import cn.com.ctop.crawler.modules.core.entity.CrawlerDouyinMusicTask;
|
|
|
+import cn.com.ctop.common.module.utils.Check;
|
|
|
+import cn.com.ctop.common.module.utils.CorpWexinUtils;
|
|
|
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.KuaiShouCreative;
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouGroup;
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouProgramCreative;
|
|
|
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.entity.KuaiShouProjectData;
|
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
|
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouProjectDataService;
|
|
|
-import cn.com.ctop.kuaishou.modules.report.service.IKuaishouAudienceReportDailyService;
|
|
|
import cn.com.ctop.manage.modules.material.service.IMaterialUploadService;
|
|
|
-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.entity.BytedanceCheckReportTaskInfo;
|
|
|
-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 cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.ibatis.annotations.Param;
|
|
|
-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.beans.factory.annotation.Value;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.InputStream;
|
|
|
-import java.math.BigDecimal;
|
|
|
-import java.text.ParseException;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.*;
|
|
|
+import java.util.List;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
-import static org.jeecg.common.util.DateUtils.getAnotherDay;
|
|
|
-
|
|
|
/**
|
|
|
* @author jeecg-boot
|
|
|
*/
|
|
@@ -133,7 +104,7 @@ public class TestController {
|
|
|
|
|
|
@Autowired
|
|
|
private IBatchService batchService;
|
|
|
- static ExecutorService videoService = Executors.newFixedThreadPool(8);
|
|
|
+ static ExecutorService videoService = Executors.newFixedThreadPool(10);
|
|
|
@Autowired
|
|
|
private IMaterialUploadService materialUploadService;
|
|
|
@Autowired
|
|
@@ -145,7 +116,64 @@ public class TestController {
|
|
|
private String jobUrl;
|
|
|
|
|
|
|
|
|
- @GetMapping(value = "/getProgramCreative")
|
|
|
+ @GetMapping(value = "/updateMaterial")
|
|
|
+ public void updateMaterial() {
|
|
|
+
|
|
|
+ List<String> codeList = materialInfoService.getCodeList();
|
|
|
+ for (int i = 0; i < codeList.size(); i++) {
|
|
|
+ String s = codeList.get(i);
|
|
|
+ if (Check.isNull(s)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Integer num = materialInfoService.getCountByCode(s);
|
|
|
+ if (num > 0) {
|
|
|
+ videoService.submit(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ try {
|
|
|
+ System.err.println(s);
|
|
|
+ materialInfoService.updateByCode(s);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping(value = "/updateByteDanceMaterial")
|
|
|
+ public void updateByteDanceMaterial() {
|
|
|
+
|
|
|
+ List<String> codeList = materialInfoService.getBytedanceCodeList();
|
|
|
+ for (int i = 0; i < codeList.size(); i++) {
|
|
|
+ String s = codeList.get(i);
|
|
|
+ if (Check.isNull(s)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Integer num = materialInfoService.getBytedanceCountByCode(s);
|
|
|
+ if (num > 0) {
|
|
|
+ videoService.submit(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ try {
|
|
|
+ System.err.println(s);
|
|
|
+ materialInfoService.updateByteDanceByCode(s);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /* @GetMapping(value = "/getProgramCreative")
|
|
|
public void getProgramCreative() {
|
|
|
List<Long> list = new ArrayList();
|
|
|
|
|
@@ -233,9 +261,9 @@ public class TestController {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+*/
|
|
|
|
|
|
-
|
|
|
- @GetMapping(value = "/updateProgramCreative")
|
|
|
+ /* @GetMapping(value = "/updateProgramCreative")
|
|
|
public void updateProgramCreative() {
|
|
|
List<Long> list = new ArrayList();
|
|
|
list.add(10173366L);
|
|
@@ -298,8 +326,8 @@ public class TestController {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+*/
|
|
|
+/*
|
|
|
@GetMapping(value = "/campaignList")
|
|
|
public void campaignList() {
|
|
|
List<Long> list = new ArrayList();
|
|
@@ -330,10 +358,10 @@ public class TestController {
|
|
|
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
- @GetMapping(value = "/creativeList")
|
|
|
+ /*@GetMapping(value = "/creativeList")
|
|
|
public void creativeList() {
|
|
|
List<Long> list = new ArrayList();
|
|
|
list.add(10108671L);
|
|
@@ -460,9 +488,9 @@ public class TestController {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+*/
|
|
|
|
|
|
-
|
|
|
- @GetMapping("/testSend")
|
|
|
+ /* @GetMapping("/testSend")
|
|
|
public void testSend(String userId) {
|
|
|
|
|
|
JSONObject weChatId = mailLogMapper.getWChatIdByUserId(userId);
|
|
@@ -1477,14 +1505,14 @@ public class TestController {
|
|
|
private IKuaishouStrategyService kuaishouStrategyService;
|
|
|
static ExecutorService executorServic1e = Executors.newFixedThreadPool(5);
|
|
|
|
|
|
- /**
|
|
|
+ *//**
|
|
|
* 勿动勿删,煜一人群报表数据拉取接口。
|
|
|
*
|
|
|
* @param
|
|
|
* @return void
|
|
|
* @throws
|
|
|
* @author ZHAOXA
|
|
|
- */
|
|
|
+ *//*
|
|
|
@PostMapping(value = "/getAudienceData")
|
|
|
public Result getAudienceData(@RequestBody JSONObject request) throws Exception {
|
|
|
Long accountId = request.getLong("accountId");
|
|
@@ -1624,7 +1652,7 @@ public class TestController {
|
|
|
token.setAccessToken("2d25790930310af270d2160652111ccf263d3b4f");
|
|
|
|
|
|
advertiserDataService.getMaterialList(token);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
}
|