<?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.xhkjedu.sclass.mapper.classroom.ClassroomPaperScantronMapper">
    <!--保存答题卡题型下试题-->
    <insert id="batchSave">
        insert into t_classroom_paper_scantron(pscaid,paperid,pqtypeid,ctype,ctypename,psorder,psscore
        ,createid,createtime,schoolid,psanswer,optionnum)
        values
        <foreach collection="list" item="r" index="index" separator=",">
            (#{r.pscaid},#{r.paperid},#{r.pqtypeid},#{r.ctype},#{r.ctypename},#{r.psorder},#{r.psscore}
            ,#{r.createid},#{r.createtime},#{r.schoolid},#{r.psanswer},#{r.optionnum})
        </foreach>
    </insert>

    <!--获取试题详情-->
    <select id="listByIds" resultType="com.xhkjedu.sclass.model.classroom.TClassroomPaperScantron">
        select pscaid,psanswer,ctype from t_classroom_paper_scantron where pscaid in
        <foreach collection="pscaids" item="pscaid" index="index" open="(" separator="," close=")">
            ${pscaid}
        </foreach>
    </select>
</mapper>
