package com.qmth.themis.business.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.themis.business.dao.TBExamInvigilateUserMapper;
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 com.qmth.themis.business.service.TBExamInvigilateUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Description: 监考员设置 服务实现类
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/7/9
 */
@Service
public class TBExamInvigilateUserServiceImpl extends ServiceImpl<TBExamInvigilateUserMapper, TBExamInvigilateUser> implements TBExamInvigilateUserService {

    @Resource
    TBExamInvigilateUserMapper tbExamInvigilateUserMapper;

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

    /**
     * 监考员导出
     *
     * @param examId
     * @param roomCode
     * @param userId
     * @param orgId
     * @return
     */
    @Override
    public List<RoomCodeExportDto> examInvigilateUserExport(Long examId, String roomCode, Long userId, Long orgId) {
        return tbExamInvigilateUserMapper.examInvigilateUserExport(examId, roomCode, userId, orgId);
    }

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