<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qmth.teachcloud.mark.mapper.ScanPaperPageMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qmth.teachcloud.mark.entity.ScanPaperPage">
        <id column="paper_id" property="paperId" />
        <id column="page_index" property="pageIndex" />
        <result column="absent" property="absent" jdbcType="VARCHAR" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
        <result column="breach" property="breach" jdbcType="VARCHAR" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" />
        <result column="question" property="question"  jdbcType="VARCHAR" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
        <result column="selective" property="selective"  jdbcType="VARCHAR" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
        <result column="sheet_path" property="sheetPath" />
        <result column="recog_data" property="recogData" />
        <result column="creator_id" property="creatorId" />
        <result column="updater_id" property="updaterId" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
    </resultMap>
	<select id="listByStudentIds"
            resultType="com.qmth.teachcloud.mark.bean.archivescore.ScanPaperPageVo">
        SELECT
        t.student_id,
        t.sheetPath
        FROM
        scan_student_paper t
        inner join scan_paper_page p on p.paper_id=t.paper_id
        WHERE 1=2
        <foreach collection="studentIds" index="index" item="studentId">
            or t.student_id=#{studentId}
        </foreach>
        order by t.paper_index,p.page_index
    </select>
</mapper>
