package com.qmth.distributed.print.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.distributed.print.business.entity.ExamCard;
import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 题卡 Mapper 接口
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface ExamCardMapper extends BaseMapper<ExamCard> {

    List<ExamCard> listGenericCard(@Param("schoolId") Long schoolId, @Param("type") String type, @Param("cardRuleId") Long cardRuleId);

    List<ExamCard> listCustom(@Param("schoolId") Long schoolId, @Param("courseCode") String courseCode, @Param("type") String type, @Param("cardRuleId") Long cardRuleId);

    IPage<ExamCard> listPage(@Param("page") Page<ExamCard> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("cardType") String cardType, @Param("title") String title, @Param("createMethod") String createMethod, @Param("enable") Boolean enable, @Param("createStartTime") Long createStartTime, @Param("createEndTime") Long createEndTime, @Param("dpr") DataPermissionRule dpr);

    List<ExamCard> listCustomByExamStage(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("type") String type);
}
