package org.jeecg.modules.xxl;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;

import lombok.extern.slf4j.Slf4j;

import org.jeecg.modules.adweb.dmp.service.google.GAReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * GA报表数据同步任务，{@link GAReportService}
 *
 * @author wfansh
 */
@Slf4j
@Component
public class GAReportJob {

    @Autowired private GAReportService gaReportService;

    @XxlJob("syncGAReportHandler")
    public ReturnT<String> syncGAReportHandler(String param) {
        log.info("同步GA报表数据...");
        gaReportService.syncGAReport();
        log.info("同步GA报表数据结束");

        return ReturnT.SUCCESS;
    }
}
