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

    <resultMap id="dmausertableMap" type="com.tofly.xrtygis.entity.Dmausertable">
        <id property="yhbh" column="YHBH"/>
        <result property="dmaIds" column="DMA_IDS"/>
        <result property="sbcjmc" column="SBCJMC"/>
        <result property="sblxmc" column="SBLXMC"/>
        <result property="cbpqmc" column="CBPQMC"/>
        <result property="cbbmc" column="CBBMC"/>
        <result property="zhXgrq" column="ZH_XGRQ"/>
        <result property="dayWater" column="DAY_WATER"/>
        <result property="yhzt" column="YHZT"/>
        <result property="yhxm" column="YHXM"/>
        <result property="yhdz" column="YHDZ"/>
        <result property="cbpq" column="CBPQ"/>
        <result property="cbb" column="CBB"/>
        <result property="sbbh" column="SBBH"/>
        <result property="sbcj" column="SBCJ"/>
        <result property="sblx" column="SBLX"/>
        <result property="sbkj" column="SBKJ"/>
    </resultMap>

    <update id="updateBingDma">
        <foreach collection="map.entrySet()" index="yhbh" open="begin" close=";end;" item="dmaGuid" separator=";">
            update TF_YWPN_DMAUSERTABLE_W
            <set>
                DMA_IDS = #{dmaGuid}
            </set>
            where YHBH = #{yhbh}
        </foreach>
    </update>
<!--    <select id="queryExist" resultMap="dmausertableMap">-->
<!--        select YHBH , nvl(DMA_IDS , '') from TF_YWPN_DMAUSERTABLE_W where-->
<!--        YHBH in-->
<!--        <foreach collection="yhbhList" item="yhbh" open="(" separator="," close=")">-->
<!--            #{yhbh}-->
<!--        </foreach>-->
<!--    </select>-->


</mapper>
