<?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.yinlihupo.enlish.service.domain.mapper.PlanExamDOMapper">
    <resultMap id="BaseResultMap" type="com.yinlihupo.enlish.service.domain.dataobject.PlanExamDO">
        <id column="id" jdbcType="INTEGER" property="id" />
        <result column="plan_id" jdbcType="INTEGER" property="planId" />
        <result column="exam_id" jdbcType="INTEGER" property="examId" />
    </resultMap>

    <insert id="insert" useGeneratedKeys="true" keyProperty="id">
        insert into plan_exam (plan_id, exam_id)
        values (#{planId}, #{examId})
    </insert>
    <select id="selectByExamId" resultMap="BaseResultMap">
        select * from plan_exam where exam_id = #{examId}
    </select>

</mapper>