소스 검색

修改公司报表上线的定时任务参数

sunzhen 5 년 전
부모
커밋
de3ef1729a

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/job/KuaishouReportAgentJob.java

@@ -30,10 +30,10 @@ public class KuaishouReportAgentJob implements Job {
     private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-//        String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(),-1));
-//        kuaishouReportDailyAgentService.getReport(currentDate,currentDate);
+        String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(),-1));
+        kuaishouReportDailyAgentService.getReport(currentDate,currentDate);
 
-        kuaishouReportDailyAgentService.getReport("2019-01-01","2019-12-12");
+        //kuaishouReportDailyAgentService.getReport("2019-01-01","2019-12-12");
 
     }
 }

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyAgentServiceImpl.java

@@ -48,7 +48,7 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
     }
 
     public void getReport(String startDate,String endDate){
-        System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
+        System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
         String url = "https://agent.e.kuaishou.com";
         ChromeOptions chromeOptions = new ChromeOptions();
         chromeOptions.addArguments("--headless");