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

import cn.iocoder.yudao.module.exam.entity.ExamBatchItem;
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
import cn.iocoder.yudao.module.exam.vo.ExamVO;
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 ExamBatchItemMapper extends BaseMapper<ExamBatchItem> {

    IPage<ExamBatchItemVO> queryListPage(@Param("entity") ExamBatchVO pageReqVO, Page<ExamBatchItemVO> page);

    List<ExamBatchItemVO> selectByBatchId(@Param("batchId") String batchId);

    List<ExamBatchItemVO> selectByUserIdAndCoachId(@Param("userId") Long userId, @Param("coachId") Long coachId);

    List<ExamBatchItemVO> selectByCoachId(@Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<ExamVO> selectExamByUserIdAndCoachId(@Param("userId") Long userId, @Param("coachId") Long coachId);
    List<ExamVO> selectExamByUserIdAndCoachIdNew(@Param("userId") Long userId, @Param("coachId") Long coachId);

    List<ExamBatchItemVO> listJoinBatchByIds(@Param("examIds") List<String> examIds);
    IPage<ExamBatchVO> batchItemListByCoach(@Param("entity") ExamBatchVO examBatchVO, Page<ExamBatchVO> page);

    List<ExamBatchItemVO> getBatchItemCount(@Param("batchId") String batchId);
}
