<?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.emergency.EmergencyTypeMapper">

    <resultMap id="emergencyTypeMap" type="com.tofly.pojo.emergency.EmergencyType">
        <id property="id" column="ID"/>
        <result property="name" column="NAME"/>
        <result property="createUser" column="CREATE_USER"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="note" column="NOTE"/>
        <result property="flag" column="FLAG"/>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.gpsboot.mapper.plan.HydrantrecordMapper.getRealName"/>
    </resultMap>

    <select id="getTypeName" resultType="string">
        select NAME from TF_YWPN_EMERGENCY_TYPE_W
        where ID = #{typeId}
    </select>

</mapper>
