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 hyWorkTask4() throws Exception
    {
        // 更新已完课的催课看板
        hyWorkTaskService.delHyWorkTaskByOver();
    }

    /**
     * 会员查看催课面板 获取看课中断和待看的先导课
     * @throws Exception
     */
    public void hyWorkTask(){

        hyWorkTaskService.hyWorkTask();
    }

}
