<?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="office">
    <!-- 导入老师数据-->
    <insert id="insertTeacherExcel" parameterType="map">
        insert into teacher(t_id,name,sex,title,sub_id)
        values(#{tId,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},
        (select sub_id from subject where name = #{subName,jdbcType=VARCHAR}))
    </insert>

</mapper>
