<?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.tofly.gpsboot.mapper.trouble.ToublerangeMapper">

    <resultMap id="toublerangeMap" type="com.tofly.pojo.trouble.Toublerange">
        <id property="id" column="ID"/>
        <result property="name" column="NAME"/>
        <result property="notes" column="NOTES"/>
        <result property="createUser" column="CREATE_USER"/>
        <result property="createTime" column="CREATE_TIME"/>
        <association property="createUserName" column="CREATE_USER"
                     select="getUserName"/>
    </resultMap>

    <select id="getUserName" resultType="java.lang.String" parameterType="java.lang.Long">
        select real_name from tf_smpn_user_x where id=#{id}
    </select>
</mapper>
