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

import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyGroupService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.jeecg.common.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class KuaishouReportDailyGroupChannelCodeJob {
    @Autowired
    private IKuaishouReportDailyGroupService groupService;

    @XxlJob("kuaishouReportDailyGroupChannelCode")
    public void execute() throws Exception {
        String date = DateUtils.formatDate(DateUtils.addDay(new Date(), -1));
        groupService.formatChannelCode(date);
    }
}
