<?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.hc.business.mapper.ZccmPaperQuestionMapper">

    <resultMap type="zccmpaperQuestion" id="PaperQuestionMap">
        <result property="paperRuleId" column="paper_rule_id" jdbcType="INTEGER"/>
        <result property="paperId" column="paper_id" jdbcType="INTEGER"/>
        <result property="questionNum" column="question_num" jdbcType="INTEGER"/>
        <result property="questionLevel" column="question_level" jdbcType="INTEGER"/>
        <result property="questionType" column="question_type" jdbcType="INTEGER"/>
        <result property="score" column="score" jdbcType="INTEGER"/>
        <result property="questionTagId" column="question_tag_id" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
        paper_rule_id,
           paper_id,
           question_num,
           question_level,
           question_type,
           score,
           question_tag_id
    </sql>

    <select id="queryByPaperId" resultMap="PaperQuestionMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM zccm_paper_question
        WHERE paper_id = #{paperId}
    </select>

</mapper>