package com.yonge.cooleshow.biz.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonge.cooleshow.biz.dal.entity.CourseScheduleRecord;
import com.yonge.cooleshow.biz.dal.vo.CourseScheduleRecordVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author: cy
 * @Date: 2022/5/30
 */
public interface CourseScheduleRecordDao extends BaseMapper<CourseScheduleRecord> {
    //统计人数&时长
    List<CourseScheduleRecord> sumCourseTime();

    //批量添加
    void insertBatch(@Param("recordList") List<CourseScheduleRecord> recordList);

    //消耗时长
    Long countTimeByTeacherId(@Param("teacherId")Long teacherId,@Param("month") String month);

    //消耗时长详情
    IPage<CourseScheduleRecordVo> selectConsumeTimeList(Page<CourseScheduleRecordVo> pageInfo, @Param("param") Map<String, Object> param);

    //查询课程列表
    IPage<CourseScheduleRecordVo> selectCourseList(Page<CourseScheduleRecordVo> pageInfo,@Param("param") Map<String, Object> param);
}