package com.fs.task;

import com.fs.course.service.IFsCourseWatchLogService;
import com.fs.qw.service.IHyWorkTaskService;
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("fsCourseTask")
public class FsCourseTask {
    @Autowired
    private IFsCourseWatchLogService fsCourseWatchLogService;
    @Autowired
    private IHyWorkTaskService hyWorkTaskService;
    /**
     * 添加会员观看日志
     * @throws Exception
     */
    public void addHyWatchLog() throws Exception
    {
        fsCourseWatchLogService.addCourseWatchLogDayNew();
    }

    /**
     * 会员任务定时更新
     * @throws Exception
     */
    public void hyWorkTask1() throws Exception
    {
        hyWorkTaskService.addHyWorkByCourse4();
        hyWorkTaskService.addHyWorkByCourseLastTime();
    }
    /**
     * 会员待看课和先导课
     * @throws Exception
     */
    public void hyWorkTask2() throws Exception
    {
        hyWorkTaskService.addHyWorkByCourse();
        hyWorkTaskService.addHyWorkByFirstCourse();
    }
    /**
     * 用户大小转
     * @throws Exception
     */
    public void hyWorkTask3() throws Exception
    {
        hyWorkTaskService.addHyWorkByConversionDay();
    }
    /**
     * 删除过期数据
     * @throws Exception
     */
    public void hyWorkTask4() throws Exception
    {
        hyWorkTaskService.delHyWorkTaskByOver();
    }

}
