<?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.brilliance.isc.mda.dao.CecmopnMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.esb.newmodel.cecm.Cecmopn">
        <result property="ywpz" column="ywpz" jdbcType="VARCHAR"/>
        <result property="ghjgh" column="ghjgh" jdbcType="VARCHAR"/>
        <result property="edlx" column="edlx" jdbcType="VARCHAR"/>
        <result property="edbh" column="edbh" jdbcType="VARCHAR"/>
        <result property="sfhyyw" column="sfhyyw" jdbcType="VARCHAR"/>
        <result property="swiftno" column="swiftno" jdbcType="VARCHAR"/>
        <result property="tyxyno" column="tyxyno" jdbcType="VARCHAR"/>
        <result property="ownref" column="ownref" jdbcType="VARCHAR"/>
        <result property="littyp" column="littyp" jdbcType="VARCHAR"/>
        <result property="jerc" column="jerc" jdbcType="VARCHAR"/>
        <result property="opndat" column="opndat" jdbcType="VARCHAR"/>
        <result property="expdat" column="expdat" jdbcType="VARCHAR"/>
        <result property="fkqxlx" column="fkqxlx" jdbcType="VARCHAR"/>
        <result property="rzjgh" column="rzjgh" jdbcType="VARCHAR"/>
        <result property="extkey" column="extkey" jdbcType="VARCHAR"/>
        <result property="khnam" column="khnam" jdbcType="VARCHAR"/>
        <result property="klbz" column="klbz" jdbcType="VARCHAR"/>
        <result property="klje" column="klje" jdbcType="VARCHAR"/>
        <result property="bzjzh" column="bzjzh" jdbcType="VARCHAR"/>
        <result property="bzjbl" column="bzjbl" jdbcType="VARCHAR"/>
        <result property="kljerc" column="kljerc" jdbcType="VARCHAR"/>
        <result property="ywbjdh" column="ywbjdh" jdbcType="VARCHAR"/>
        <result property="fxfl" column="fxfl" jdbcType="VARCHAR"/>
        <result property="battrninr" column="battrninr" jdbcType="VARCHAR"/>
        <result property="trninr" column="trninr" jdbcType="VARCHAR"/>
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="tylimref" column="tylimref" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        ywpz,ghjgh,edlx,edbh,sfhyyw,swiftno,tyxyno,ownref,littyp,jerc,opndat,expdat,fkqxlx,rzjgh,extkey,khnam,klbz,klje,bzjzh,bzjbl,kljerc,ywbjdh,fxfl,battrninr,trninr,inr,tylimref
    </sql>

    <select id="selectByPrimaryKey" resultMap="BaseResultMap">
        select
            <include refid="Base_Column_List" />
        from cecmopn
        where inr = #{inr,jdbcType=VARCHAR}
    </select>

    <delete id="deleteByPrimaryKey">
        delete from cecmopn
        where inr = #{inr,jdbcType=VARCHAR}
    </delete>

    <insert id="insert">
        insert into cecmopn (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{ywpz,jdbcType=VARCHAR},
            #{ghjgh,jdbcType=VARCHAR},
            #{edlx,jdbcType=VARCHAR},
            #{edbh,jdbcType=VARCHAR},
            #{sfhyyw,jdbcType=VARCHAR},
            #{swiftno,jdbcType=VARCHAR},
            #{tyxyno,jdbcType=VARCHAR},
            #{ownref,jdbcType=VARCHAR},
            #{littyp,jdbcType=VARCHAR},
            #{jerc,jdbcType=VARCHAR},
            #{opndat,jdbcType=VARCHAR},
            #{expdat,jdbcType=VARCHAR},
            #{fkqxlx,jdbcType=VARCHAR},
            #{rzjgh,jdbcType=VARCHAR},
            #{extkey,jdbcType=VARCHAR},
            #{khnam,jdbcType=VARCHAR},
            #{klbz,jdbcType=VARCHAR},
            #{klje,jdbcType=VARCHAR},
            #{bzjzh,jdbcType=VARCHAR},
            #{bzjbl,jdbcType=VARCHAR},
            #{kljerc,jdbcType=VARCHAR},
            #{ywbjdh,jdbcType=VARCHAR},
            #{fxfl,jdbcType=VARCHAR},
            #{battrninr,jdbcType=VARCHAR},
            #{trninr,jdbcType=VARCHAR},
            #{inr,jdbcType=VARCHAR},
            #{tylimref,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into cecmopn
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="ywpz != null">ywpz,</if>
            <if test="ghjgh != null">ghjgh,</if>
            <if test="edlx != null">edlx,</if>
            <if test="edbh != null">edbh,</if>
            <if test="sfhyyw != null">sfhyyw,</if>
            <if test="swiftno != null">swiftno,</if>
            <if test="tyxyno != null">tyxyno,</if>
            <if test="ownref != null">ownref,</if>
            <if test="littyp != null">littyp,</if>
            <if test="jerc != null">jerc,</if>
            <if test="opndat != null">opndat,</if>
            <if test="expdat != null">expdat,</if>
            <if test="fkqxlx != null">fkqxlx,</if>
            <if test="rzjgh != null">rzjgh,</if>
            <if test="extkey != null">extkey,</if>
            <if test="khnam != null">khnam,</if>
            <if test="klbz != null">klbz,</if>
            <if test="klje != null">klje,</if>
            <if test="bzjzh != null">bzjzh,</if>
            <if test="bzjbl != null">bzjbl,</if>
            <if test="kljerc != null">kljerc,</if>
            <if test="ywbjdh != null">ywbjdh,</if>
            <if test="fxfl != null">fxfl,</if>
            <if test="battrninr != null">battrninr,</if>
            <if test="trninr != null">trninr,</if>
            <if test="inr != null">inr,</if>
            <if test="tylimref != null">tylimref,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="ywpz != null">#{ywpz,jdbcType=VARCHAR}, </if>
            <if test="ghjgh != null">#{ghjgh,jdbcType=VARCHAR}, </if>
            <if test="edlx != null">#{edlx,jdbcType=VARCHAR}, </if>
            <if test="edbh != null">#{edbh,jdbcType=VARCHAR}, </if>
            <if test="sfhyyw != null">#{sfhyyw,jdbcType=VARCHAR}, </if>
            <if test="swiftno != null">#{swiftno,jdbcType=VARCHAR}, </if>
            <if test="tyxyno != null">#{tyxyno,jdbcType=VARCHAR}, </if>
            <if test="ownref != null">#{ownref,jdbcType=VARCHAR}, </if>
            <if test="littyp != null">#{littyp,jdbcType=VARCHAR}, </if>
            <if test="jerc != null">#{jerc,jdbcType=VARCHAR}, </if>
            <if test="opndat != null">#{opndat,jdbcType=VARCHAR}, </if>
            <if test="expdat != null">#{expdat,jdbcType=VARCHAR}, </if>
            <if test="fkqxlx != null">#{fkqxlx,jdbcType=VARCHAR}, </if>
            <if test="rzjgh != null">#{rzjgh,jdbcType=VARCHAR}, </if>
            <if test="extkey != null">#{extkey,jdbcType=VARCHAR}, </if>
            <if test="khnam != null">#{khnam,jdbcType=VARCHAR}, </if>
            <if test="klbz != null">#{klbz,jdbcType=VARCHAR}, </if>
            <if test="klje != null">#{klje,jdbcType=VARCHAR}, </if>
            <if test="bzjzh != null">#{bzjzh,jdbcType=VARCHAR}, </if>
            <if test="bzjbl != null">#{bzjbl,jdbcType=VARCHAR}, </if>
            <if test="kljerc != null">#{kljerc,jdbcType=VARCHAR}, </if>
            <if test="ywbjdh != null">#{ywbjdh,jdbcType=VARCHAR}, </if>
            <if test="fxfl != null">#{fxfl,jdbcType=VARCHAR}, </if>
            <if test="battrninr != null">#{battrninr,jdbcType=VARCHAR}, </if>
            <if test="trninr != null">#{trninr,jdbcType=VARCHAR}, </if>
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="tylimref != null">#{tylimref,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update cecmopn
        <set>
            <if test="ywpz != null">ywpz = #{ywpz,jdbcType=VARCHAR},</if>
            <if test="ghjgh != null">ghjgh = #{ghjgh,jdbcType=VARCHAR},</if>
            <if test="edlx != null">edlx = #{edlx,jdbcType=VARCHAR},</if>
            <if test="edbh != null">edbh = #{edbh,jdbcType=VARCHAR},</if>
            <if test="sfhyyw != null">sfhyyw = #{sfhyyw,jdbcType=VARCHAR},</if>
            <if test="swiftno != null">swiftno = #{swiftno,jdbcType=VARCHAR},</if>
            <if test="tyxyno != null">tyxyno = #{tyxyno,jdbcType=VARCHAR},</if>
            <if test="ownref != null">ownref = #{ownref,jdbcType=VARCHAR},</if>
            <if test="littyp != null">littyp = #{littyp,jdbcType=VARCHAR},</if>
            <if test="jerc != null">jerc = #{jerc,jdbcType=VARCHAR},</if>
            <if test="opndat != null">opndat = #{opndat,jdbcType=VARCHAR},</if>
            <if test="expdat != null">expdat = #{expdat,jdbcType=VARCHAR},</if>
            <if test="fkqxlx != null">fkqxlx = #{fkqxlx,jdbcType=VARCHAR},</if>
            <if test="rzjgh != null">rzjgh = #{rzjgh,jdbcType=VARCHAR},</if>
            <if test="extkey != null">extkey = #{extkey,jdbcType=VARCHAR},</if>
            <if test="khnam != null">khnam = #{khnam,jdbcType=VARCHAR},</if>
            <if test="klbz != null">klbz = #{klbz,jdbcType=VARCHAR},</if>
            <if test="klje != null">klje = #{klje,jdbcType=VARCHAR},</if>
            <if test="bzjzh != null">bzjzh = #{bzjzh,jdbcType=VARCHAR},</if>
            <if test="bzjbl != null">bzjbl = #{bzjbl,jdbcType=VARCHAR},</if>
            <if test="kljerc != null">kljerc = #{kljerc,jdbcType=VARCHAR},</if>
            <if test="ywbjdh != null">ywbjdh = #{ywbjdh,jdbcType=VARCHAR},</if>
            <if test="fxfl != null">fxfl = #{fxfl,jdbcType=VARCHAR},</if>
            <if test="battrninr != null">battrninr = #{battrninr,jdbcType=VARCHAR},</if>
            <if test="trninr != null">trninr = #{trninr,jdbcType=VARCHAR},</if>
            <if test="inr != null">inr = #{inr,jdbcType=VARCHAR},</if>
            <if test="tylimref != null">inr = #{tylimref,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update cecmopn
        <set>
            ywpz = #{ywpz,jdbcType=VARCHAR},
            ghjgh = #{ghjgh,jdbcType=VARCHAR},
            edlx = #{edlx,jdbcType=VARCHAR},
            edbh = #{edbh,jdbcType=VARCHAR},
            sfhyyw = #{sfhyyw,jdbcType=VARCHAR},
            swiftno = #{swiftno,jdbcType=VARCHAR},
            tyxyno = #{tyxyno,jdbcType=VARCHAR},
            ownref = #{ownref,jdbcType=VARCHAR},
            littyp = #{littyp,jdbcType=VARCHAR},
            jerc = #{jerc,jdbcType=VARCHAR},
            opndat = #{opndat,jdbcType=VARCHAR},
            expdat = #{expdat,jdbcType=VARCHAR},
            fkqxlx = #{fkqxlx,jdbcType=VARCHAR},
            rzjgh = #{rzjgh,jdbcType=VARCHAR},
            extkey = #{extkey,jdbcType=VARCHAR},
            khnam = #{khnam,jdbcType=VARCHAR},
            klbz = #{klbz,jdbcType=VARCHAR},
            klje = #{klje,jdbcType=VARCHAR},
            bzjzh = #{bzjzh,jdbcType=VARCHAR},
            bzjbl = #{bzjbl,jdbcType=VARCHAR},
            kljerc = #{kljerc,jdbcType=VARCHAR},
            ywbjdh = #{ywbjdh,jdbcType=VARCHAR},
            fxfl = #{fxfl,jdbcType=VARCHAR},
            battrninr = #{battrninr,jdbcType=VARCHAR},
            trninr = #{trninr,jdbcType=VARCHAR},
            inr = #{inr,jdbcType=VARCHAR},
            tylimref = #{tylimref,jdbcType=VARCHAR},
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <delete id="deleteByIds">
        delete from act where inr in
        <foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <update id="dyncUpdate">
        update cecmopn
        <set>
            <if test="module.ywpz != null">ywpz = #{module.ywpz,jdbcType=VARCHAR},</if>
            <if test="module.ghjgh != null">ghjgh = #{module.ghjgh,jdbcType=VARCHAR},</if>
            <if test="module.edlx != null">edlx = #{module.edlx,jdbcType=VARCHAR},</if>
            <if test="module.edbh != null">edbh = #{module.edbh,jdbcType=VARCHAR},</if>
            <if test="module.sfhyyw != null">sfhyyw = #{module.sfhyyw,jdbcType=VARCHAR},</if>
            <if test="module.swiftno != null">swiftno = #{module.swiftno,jdbcType=VARCHAR},</if>
            <if test="module.tyxyno != null">tyxyno = #{module.tyxyno,jdbcType=VARCHAR},</if>
            <if test="module.ownref != null">ownref = #{module.ownref,jdbcType=VARCHAR},</if>
            <if test="module.littyp != null">littyp = #{module.littyp,jdbcType=VARCHAR},</if>
            <if test="module.jerc != null">jerc = #{module.jerc,jdbcType=VARCHAR},</if>
            <if test="module.opndat != null">opndat = #{module.opndat,jdbcType=VARCHAR},</if>
            <if test="module.expdat != null">expdat = #{module.expdat,jdbcType=VARCHAR},</if>
            <if test="module.fkqxlx != null">fkqxlx = #{module.fkqxlx,jdbcType=VARCHAR},</if>
            <if test="module.rzjgh != null">rzjgh = #{module.rzjgh,jdbcType=VARCHAR},</if>
            <if test="module.extkey != null">extkey = #{module.extkey,jdbcType=VARCHAR},</if>
            <if test="module.khnam != null">khnam = #{module.khnam,jdbcType=VARCHAR},</if>
            <if test="module.klbz != null">klbz = #{module.klbz,jdbcType=VARCHAR},</if>
            <if test="module.klje != null">klje = #{module.klje,jdbcType=VARCHAR},</if>
            <if test="module.bzjzh != null">bzjzh = #{module.bzjzh,jdbcType=VARCHAR},</if>
            <if test="module.bzjbl != null">bzjbl = #{module.bzjbl,jdbcType=VARCHAR},</if>
            <if test="module.kljerc != null">kljerc = #{module.kljerc,jdbcType=VARCHAR},</if>
            <if test="module.ywbjdh != null">ywbjdh = #{module.ywbjdh,jdbcType=VARCHAR},</if>
            <if test="module.fxfl != null">fxfl = #{module.fxfl,jdbcType=VARCHAR},</if>
            <if test="module.battrninr != null">battrninr = #{module.battrninr,jdbcType=VARCHAR},</if>
            <if test="module.trninr != null">trninr = #{module.trninr,jdbcType=VARCHAR},</if>
            <if test="module.inr != null">inr = #{module.inr,jdbcType=VARCHAR},</if>
            <if test="module.tylimref != null">tylimref = #{module.tylimref,jdbcType=VARCHAR},</if>
        </set>
        ${conditions}
    </update>

    <delete id="dyncDelete">
        ${sql}
    </delete>

    <select id="dyncRead" resultMap="BaseResultMap">
        ${sql}
    </select>
    <select id="selectByTrninr" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from cecmopn
        where trninr = #{trninr,jdbcType=VARCHAR}
    </select>

    <delete id="deleteByTrninr">
        delete from cecmopn
        where trninr = #{trninr,jdbcType=VARCHAR}
    </delete>
</mapper>