package cn.com.ctop.kuaishou.modules.report.job;
import cn.com.ctop.common.module.utils.HttpUtils2;
import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAgent;
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.http.client.CookieStore;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.impl.cookie.BasicClientCookie;
import org.jeecg.common.util.DateUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.Cookie;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;

public class KuaishouReportAgentJob implements Job {

    @Autowired
    private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
//        String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(),-1));
//        kuaishouReportDailyAgentService.getReport(currentDate,currentDate);

        kuaishouReportDailyAgentService.getReport("2019-01-01","2019-12-12");

    }
}
