<?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.xrtygis.mapper.TfWaterInfoMapper">

  <resultMap id="tfWaterInfoMap" type="com.tofly.xrtygis.entity.TfWaterInfo">
                      <id property="id" column="ID"/>
                      <result property="createUser" column="CREATE_USER"/>
                      <result property="createTime" column="CREATE_TIME"/>
                      <result property="name" column="NAME"/>
                      <result property="longitude" column="LONGITUDE"/>
                      <result property="latitude" column="LATITUDE"/>
                      <result property="address" column="ADDRESS"/>
                      <result property="constructionUnit" column="CONSTRUCTION_UNIT"/>
                      <result property="constructionTime" column="CONSTRUCTION_TIME"/>
                      <result property="areaCovered" column="AREA_COVERED"/>
                      <result property="waterSource" column="WATER_SOURCE"/>
                      <result property="blowInTime" column="BLOW_IN_TIME"/>
                      <result property="designProcessingCapacity" column="DESIGN_PROCESSING_CAPACITY"/>
                      <result property="describe" column="DESCRIBE"/>
                      <association property="createUserName" column="CREATE_USER"
                                   select="com.tofly.xrtygis.mapper.IFileMapper.getUserName"></association>
  </resultMap>

    <select id="getWaterName" resultType="string">
        select NAME
        from TF_WATER_INFO
        where ID = #{id}
    </select>

</mapper>
