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

import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouAudienceAccountDailyService;
import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouReportAccountDailyService;
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 KuaishouAccountAudienceReportEtlJob {

    @Autowired
    private IEtlKuaishouAudienceAccountDailyService etlKuaishouAudienceAccountDailyService;

    /**
     * 清洗盯盘人群——年龄、性别数据
     * @throws Exception
     */
    @XxlJob("kuaishouAccountAudienceReportEtlJob")
    public void execute() throws Exception {
        try {
            etlKuaishouAudienceAccountDailyService.queryEveryDayAudienceInfo();
            XxlJobHelper.log("queryEveryDayAudienceInfo success");
        } catch (Exception e) {
            XxlJobHelper.log(e.getMessage());
        }
    }
}
