<?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.maintain.DispatchMapper">

    <resultMap id="dispatchMap" type="com.tofly.pojo.maintain.Dispatch">
        <id property="id" column="id"/>
        <result property="majorHandler" column="major_handler"/>
        <result property="collaborateHanler" column="collaborate_hanler"/>
        <result property="message" column="message"/>
        <result property="isPush" column="is_push"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="createUserid" column="CREATE_USERID"/>
        <result property="status" column="status"/>
        <result property="delFlag" column="del_flag"/>
        <result property="type" column="type"/>
        <result property="sourceId" column="source_id"/>
        <result property="resolveDetail" column="resolve_Detail"/>
        <result property="resolveDate" column="resolve_Date"/>
        <result property="resolveFileIds" column="resolve_File_Ids"/>

        <association property="majorHandlerName" column="major_handler"  select="selectUsername" />
    </resultMap>
    <select id="selectUsername"  resultType="java.lang.Object">
        select  real_name  from tf_smpn_user_x where id=#{id}
    </select>
</mapper>
