<?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="jnpf.cultivate.mapper.CultivateExamDrawRuleMapper">

    <!-- 查询关联题目的规则 -->
    <select id="getConnectQuestionRule" resultType="jnpf.model.cultivate.v2.exam.vo.ConnectDrawRuleVo">
        select dr.F_ExamId examId, dr.F_Id ruleId, dr.F_QuestionType questionType
        from ftb_cultivate_exam_draw_rule dr
        inner join ftb_cultivate_exam ce on dr.F_ExamId = ce.F_Id
        where ce.F_EnabledMark = 1 and ce.F_Status in (0, 1)
        and dr.F_QuestionId is not null and dr.F_QuestionId in
        <foreach collection="questionIds" index="index" item="item" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
</mapper>