|
@@ -12,7 +12,6 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskServic
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
|
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
|
-import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAccountMapper;
|
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouCostGroupService;
|
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
|
|
|
import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
|
|
@@ -22,7 +21,6 @@ import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataServ
|
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceFundDailyService;
|
|
|
import cn.com.ctop.toutiao.modules.report.service.IReportService;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.junit.Test;
|
|
@@ -56,11 +54,8 @@ public class SampleTest {
|
|
|
private IByteDanceAdvertiserDataService advertiserDataService;
|
|
|
@Autowired
|
|
|
private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ICtopOauthTokenService tokenService;
|
|
|
- @Autowired
|
|
|
- private KuaishouReportDailyAccountMapper reportDailyAccountMapper;
|
|
|
|
|
|
@Test
|
|
|
public void loadBytedanceCreativeData() {
|
|
@@ -79,10 +74,7 @@ public class SampleTest {
|
|
|
|
|
|
@Test
|
|
|
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()) {
|
|
|
int i = 0;
|
|
|
for (BindAccountLogin login : list) {
|
|
@@ -91,11 +83,10 @@ public class SampleTest {
|
|
|
i++;
|
|
|
}
|
|
|
}
|
|
|
- }*/
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static ExecutorService executorService = null;
|
|
|
- //线程计数器/bytedance/bytedanceMaterialReport
|
|
|
static CountDownLatch countDownLatch = null;
|
|
|
|
|
|
@Test
|
|
@@ -254,6 +245,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
|
|
|
private IKuaishouInterfaceService kuaishouInterfaceService;
|
|
|
|