package com.fs.app.controller.qw;

import com.fs.common.annotation.Log;
import com.fs.common.core.controller.BaseController;
import com.fs.common.core.domain.AjaxResult;
import com.fs.common.core.page.TableDataInfo;
import com.fs.common.enums.BusinessType;
import com.fs.common.exception.CustomException;
import com.fs.common.utils.poi.ExcelUtil;
import com.fs.course.domain.FsCourseWatchLog;
import com.fs.course.param.FsCourseWatchLogListParam;
import com.fs.course.param.FsCourseWatchLogStatisticsListParam;
import com.fs.course.param.PeriodStatisticCountParam;
import com.fs.course.service.IFsCourseWatchLogService;
import com.fs.course.vo.FsCourseWatchLogListVO;
import com.fs.course.vo.FsCourseWatchLogStatisticsListVO;
import com.fs.qw.param.QwWatchLogStatisticsListParam;
import com.fs.qw.service.IQwWatchLogService;
import com.fs.qw.vo.QwWatchLogAllStatisticsListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

/**
 * 短链课程看课记录Controller
 *
 * @author fs
 * @date 2024-10-24
 */
@RestController
@RequestMapping("/qw/course/courseWatchLog")
public class QwFsCourseWatchLogController extends BaseController {
    @Autowired
    private IFsCourseWatchLogService fsCourseWatchLogService;

    //    @PreAuthorize("@ss.hasPermi('course:courseWatchLog:list')")
    @GetMapping("/listBytrainingCampId")
    public TableDataInfo listBytrainingCampId(PeriodStatisticCountParam param) {
        startPage();
        List<FsCourseWatchLogListVO> list = fsCourseWatchLogService.selectListBytrainingCampId(param);
        return getDataTable(list);
    }
}
