package com.fs.task.qw;

import com.fs.course.service.IFsCourseWatchLogService;
import com.fs.qw.service.IQwWorkTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 后台统计相关 定时任务
 */
@Slf4j
@Service("qwFsCourseTask")
public class FsCourseTask {
    @Autowired
    private IFsCourseWatchLogService fsCourseWatchLogService;
    @Autowired
    private IQwWorkTaskService qwWorkTaskService;

    /**
     * 添加企微观看日志
     * @throws Exception
     */
    public void addQwWatchLog() throws Exception
    {
        fsCourseWatchLogService.addCourseWatchLogDay();
    }

    /**
     * 企微任务定时更新
     * @throws Exception
     */
    public void qwWorkTask1() throws Exception
    {
        qwWorkTaskService.addQwWorkByCourse4();
        qwWorkTaskService.addQwWorkByCourseLastTime();
    }
    /**
     * 企微待看课和先导课
     * @throws Exception
     */
    public void qwWorkTask2() throws Exception
    {
        qwWorkTaskService.addQwWorkByCourse();
        qwWorkTaskService.addQwWorkByFirstCourse();
    }
    /**
     * 用户大小转
     * @throws Exception
     */
    public void qwWorkTask3() throws Exception
    {
        qwWorkTaskService.addQwWorkByConversionDay();
    }
    /**
     * 删除过期数据
     * @throws Exception
     */
    public void qwWorkTask4() throws Exception
    {
        qwWorkTaskService.delQwWorkTaskByOver();
    }

}
