<?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.paper.library.business.mapper.BasicExamMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qmth.paper.library.common.entity.BasicExam">
        <result column="id" property="id"/>
        <result column="school_id" property="schoolId"/>
        <result column="semester_id" property="semesterId"/>
        <result column="name" property="name"/>
        <result column="create_id" property="createId"/>
        <result column="create_time" property="createTime"/>
        <result column="update_id" property="updateId"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
       select id, school_id, semester_id, name, create_id, create_time, update_id, update_time from basic_exam
    </sql>

    <select id="selectBySemesterIdAndName" resultMap="BaseResultMap">
        <include refid="Base_Column_List"></include>
        <where>
            and semester_id = #{semesterId}
            and name = #{name}
        </where>
    </select>
</mapper>