<?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.UserTeacherMapper">

    <resultMap type="userTeacher" id="UserTeacherMap">
        <result property="teacherId" column="teacher_id" jdbcType="INTEGER"/>
        <result property="teacherName" column="teacher_name" jdbcType="VARCHAR"/>
        <result property="teacherIntroduce" column="teacher_introduce" jdbcType="VARCHAR"/>
        <result property="teacherLogo" column="teacher_logo" jdbcType="VARCHAR"/>
        <result property="teacherUrl" column="teacher_url" jdbcType="VARCHAR"/>
        <result property="createTime" column="create_time" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
        teacher_id,
           teacher_name,
           teacher_introduce,
           teacher_logo,
           teacher_url,
           create_time
    </sql>

    <select id="queryByName" resultMap="UserTeacherMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM user_teacher
        WHERE teacher_name LIKE "%"#{name}"%"
    </select>

</mapper>