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

    <resultMap id="pollMap" type="com.tofly.xrtygis.entity.Poll">
        <id property="id" column="ID"/>
        <result property="sourceId" column="SOURCE_ID"/>
        <result property="pollute" column="POLLUTE"/>
        <result property="potency" column="POTENCY"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="createUser" column="CREATE_USER"/>
        <association property="polluteName" column="POLLUTE"
                     select="com.tofly.xrtygis.mapper.PolltypeMapper.getName"/>
        <association property="unit" column="POLLUTE"
                     select="com.tofly.xrtygis.mapper.PolltypeMapper.getUnit"/>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.xrtygis.mapper.IFileMapper.getUserName"/>
    </resultMap>

    <select id="getPollInfos" resultMap="pollMap">
        select *
        from TF_YWPN_POLL_W
        where SOURCE_ID = #{id}
    </select>


</mapper>
