package com.qmth.themis.business.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.themis.business.base.CustomBaseMapper;
import com.qmth.themis.business.dto.InvigilateUserExportDto;
import com.qmth.themis.business.dto.RoomCodeExportDto;
import com.qmth.themis.business.dto.response.TBExamInvigilateUserDto;
import com.qmth.themis.business.entity.TBExamInvigilateUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description: 监考员设置 Mapper 接口
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/7/9
 */
@Mapper
public interface TBExamInvigilateUserMapper extends CustomBaseMapper<TBExamInvigilateUser> {

    /**
     * 查询监考员
     *
     * @param iPage
     * @param examId
     * @param roomCode
     * @param userId
     * @param orgId
     * @return
     */
    public IPage<TBExamInvigilateUserDto> examInvigilateUserQuery(IPage<Map> iPage, @Param("examId") Long examId, @Param("roomCode") String roomCode, @Param("userId") Long userId, @Param("orgId") Long orgId);

    /**
     * 监考员导出
     *
     * @param examId
     * @param roomCode
     * @param userId
     * @param orgId
     * @return
     */
    public List<RoomCodeExportDto> examInvigilateUserExport(@Param("examId") Long examId, @Param("roomCode") String roomCode, @Param("userId") Long userId, @Param("orgId") Long orgId);

    @SuppressWarnings("MybatisXMapperMethodInspection")
    public List<Map<String, String>> getInvigilateUsers(@Param("examId") Long examId, @Param("roomCode") String roomCode);

    /**
     * 监考员登录时间导出
     *
     * @param examId
     * @return
     */
    public List<InvigilateUserExportDto> examInvigilateUserLoginTimeExport(@Param("examId") Long examId);
}
