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

    <resultMap id="polltypeMap" type="com.tofly.xrtygis.entity.Polltype">
        <id property="id" column="ID"/>
        <result property="typename" column="TYPENAME"/>
        <result property="unit" column="UNIT"/>
        <result property="notes" column="NOTES"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="createUser" column="CREATE_USER"/>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName"/>
    </resultMap>

    <select id="getName" resultType="string">
        select typename
        from TF_YWPN_POLLTYPE_W where ID = #{id}
    </select>

    <select id="getUnit" resultType="string">
        select UNIT
        from TF_YWPN_POLLTYPE_W where ID = #{id}
    </select>

</mapper>
