|
@@ -55,7 +55,6 @@ public class SampleTest {
|
|
private IByteDanceAdvertiserDataService advertiserDataService;
|
|
private IByteDanceAdvertiserDataService advertiserDataService;
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
|
|
private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ICtopOauthTokenService tokenService;
|
|
private ICtopOauthTokenService tokenService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -78,10 +77,7 @@ public class SampleTest {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void loadKuaishouCookie() {
|
|
public void loadKuaishouCookie() {
|
|
- reportDailyAccountMapper.loadAccountDailyReport(23212L, "D://report2//8206288_1.csv");
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- /* List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
|
|
|
|
|
|
+ List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
|
|
if (list != null && !list.isEmpty()) {
|
|
if (list != null && !list.isEmpty()) {
|
|
int i = 0;
|
|
int i = 0;
|
|
for (BindAccountLogin login : list) {
|
|
for (BindAccountLogin login : list) {
|
|
@@ -90,11 +86,10 @@ public class SampleTest {
|
|
i++;
|
|
i++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
static ExecutorService executorService = null;
|
|
static ExecutorService executorService = null;
|
|
- //线程计数器/bytedance/bytedanceMaterialReport
|
|
|
|
static CountDownLatch countDownLatch = null;
|
|
static CountDownLatch countDownLatch = null;
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -253,6 +248,19 @@ public class SampleTest {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ public void loadKuaishouHourlyReportData(){
|
|
|
|
+ Date getDate = new Date();
|
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
|
|
|
|
+ String hour = simpleDateFormat.format(getDate);
|
|
|
|
+ if ("00".equals(hour)) {
|
|
|
|
+ getDate = DateUtils.addDay(getDate, -1);
|
|
|
|
+ }
|
|
|
|
+ //1:查询当日数据
|
|
|
|
+ List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
|
|
|
|
+ Date finalGetDate = getDate;
|
|
|
|
+ tokens.forEach(token -> kuaishouInterfaceService.getAdvertiserReportHourly(token, finalGetDate, finalGetDate));
|
|
|
|
+ }
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaishouInterfaceService kuaishouInterfaceService;
|
|
private IKuaishouInterfaceService kuaishouInterfaceService;
|
|
|
|
|