“djh”
5 天以前 7acaebcb01438578ded72491f39105db893982ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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.gkhy.exam.system.mapper.ExPaperQuestionMapper">
    <insert id="batchInsert">
        insert into ex_paper_question(paper_id,question_id,score) values
        <foreach collection="list" item="item" index="index" separator=",">
            (#{item.paperId},#{item.questionId},#{item.score})
        </foreach>
    </insert>
 
    <delete id="deletebyPapaerId">
        delete from ex_paper_question where paper_id=#{paperId}
    </delete>
 
    <delete id="deletePaperQuestion">
        delete a from ex_paper_question as a
        inner join ex_question as b on b.id=a.question_id
        <where>
            and a.paper_id=#{paperId}
           <if test="questionType!=null">
               and b.question_type=#{questionType}
           </if>
        </where>
    </delete>
</mapper>