|
@@ -133,27 +133,25 @@ public class TestController {
|
|
|
|
|
|
|
|
|
@GetMapping("/cleanNewlyData")
|
|
|
- public void cleanNewlyData() {
|
|
|
- Date endDate = new Date();
|
|
|
- List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
|
|
|
- for (int i = 0; i < 7; i++) {
|
|
|
- Date getStartDate = DateUtils.addDay(endDate, -i);
|
|
|
- String s = DateUtils.formatDate(getStartDate);
|
|
|
- newlyService.cleanNewlyData(s);
|
|
|
+ public void cleanNewlyData(String startDate, String endDate) throws ParseException {
|
|
|
+
|
|
|
+
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date parse1 = simpleDateFormat.parse(startDate);
|
|
|
+ Date parse2 = simpleDateFormat.parse(endDate);
|
|
|
+ /* CtopOauthToken token = new CtopOauthToken();
|
|
|
+ token.setAccountId(9791267L);
|
|
|
+ token.setAccessToken("b8ab3b361cd30339ef7e18dcc1305123");*/
|
|
|
+
|
|
|
+ List<CtopOauthToken> ctopOauthTokens = tokenService.selectKuaiShouToken();
|
|
|
+ // kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate, "adScene");
|
|
|
+ ctopOauthTokens.forEach(token -> executorService.submit(() -> {
|
|
|
+ kuaishouInterfaceService.getAdvertiserReportDaily(token, parse1, parse2, "adScene");
|
|
|
+ }));
|
|
|
+
|
|
|
|
|
|
|
|
|
- for (CtopOauthToken token : tokens) {
|
|
|
- executorService.submit(new Runnable() {
|
|
|
- @Override
|
|
|
- public void run() {
|
|
|
- accountMaterialOverviewService.cleanAccountMaterialOverview(token.getAccountId(), s);
|
|
|
- reportDailyGroupService.getAdvertiserGroupReportDaily(token, getStartDate, getStartDate);
|
|
|
- etlKuaiShouGroupDailyReportService.getGroupReport(token.getAccountId(), token.getAccessToken(), s, s, 1);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
@GetMapping("/getVideoByProjectId")
|
|
|
public String getVideoByProjectId(Long projectId) {
|
|
@@ -1034,7 +1032,6 @@ public class TestController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private IBytedanceEffectVideoInfoService effectVideoInfoService;
|
|
|
|