package cn.iocoder.yudao.module.train.mapper;

import cn.iocoder.yudao.module.train.entity.Train;
import cn.iocoder.yudao.module.train.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 练车记录 Mapper
 *
 * @author 若依
 */
@Mapper
public interface TrainMapper extends BaseMapper<Train> {

    IPage<TrainVO> queryListPage(@Param("entity") TrainVO entity, Page<TrainVO> page);

    List<TrainVO> selectTrainByCondition(@Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    TrainStudentCountVO getTrainStudentCount(@Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    IPage<TrainVO> queryTrainListPage(@Param("entity") TrainVO pageReqVO, @Param("page") Page<TrainVO> page);

    List<TrainVO> listJoinBatchByIds(@Param("trainIds") List<String> trainIds);

    List<NoClockInRemindVO> noClockInRemind();
    NoClockInRemindVO noClockInRemindByUserId(@Param("userId")Long userId, @Param("carNo")String carNo);

    /**
     * 根据教练打卡id获取对应学员信息
     */
    List<Train> selectStudentByCoachClockId(String coachClockId);

    /**
     * 获取学员导出数据列表
     */
    IPage<TrainExportVO> getExportList(@Param("entity") TrainExportVO entity, Page<TrainExportVO> page);

    /**
     *  获取当日实时训练情况
     */
    CloakAndTrainCountVO getTodayTrainSituation(@Param("entity") TodayTrainVO train);
    /**
     * 获取正在训练的学员信息
     */
    IPage<TodayTrainVO> getTodayStudentTrainSituation(@Param("entity") TodayTrainVO train, Page<TodayTrainVO> page);

}
