<?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.watermeter.custom.mapper.meterBusiness.ConfigManageMapper">

    <select id="codeConfig" resultType="map">
        select ID, CCODE, CNAME, CCONTERT
        from TF_YWPN_SYSCHILDCODE_D
        where PCID = #{pcid}
          and CDISABLE = 1
        order by CCODE
    </select>

    <insert id="insertCode">
        insert into TF_YWPN_SYSCHILDCODE_D (id, pcid,PCNAME, ccode, cname)
        <foreach collection="dto" item="d" separator="union all">
            select
            #{d.id},
            2,
            '水表厂家' ,
            #{d.SBCJ_BM},
            #{d.SBCJ_MC}
            from DUAL
        </foreach>
    </insert>

</mapper>