package cn.com.ctop.job.kuaishou.handler;

import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouReportAccountDailyService;
import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouReportAccountHourlyService;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 账户维度-盯盘每小时数据
 *
 * @author syh
 */
@Component
public class KuaishouHourlyAccountReportLoadEtlJob {

    @Autowired
    private IEtlKuaishouReportAccountHourlyService hourlyService;

    /**
     * 清洗账户维度-盯盘小时数据
     * @throws Exception
     */
    @XxlJob("kuaishouHourlyAccountReportLoadEtl")
    public void execute() throws Exception {
        try {
            hourlyService.queryEveryhourlyDataForAccount();
            XxlJobHelper.log("queryEveryhourlyDataForAccount success");
        } catch (Exception e) {
            XxlJobHelper.log(e.getMessage());
        }
    }
}
