nidcxmmapper.xml 8.55 KB
Newer Older
hulei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
<?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.NidcxmMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Nidcxm">
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="quycod" column="quycod" jdbcType="VARCHAR"/>
        <result property="ownref" column="ownref" jdbcType="VARCHAR"/>
        <result property="cur" column="cur" jdbcType="VARCHAR"/>
        <result property="amt" column="amt" jdbcType="DECIMAL"/>
        <result property="opndat" column="opndat" jdbcType="DATE"/>
        <result property="expdat" column="expdat" jdbcType="DATE"/>
        <result property="warran" column="warran" jdbcType="VARCHAR"/>
        <result property="benefi" column="benefi" jdbcType="VARCHAR"/>
        <result property="relflg" column="relflg" jdbcType="VARCHAR"/>
        <result property="comdat" column="comdat" jdbcType="DATE"/>
        <result property="inifrm" column="inifrm" jdbcType="VARCHAR"/>
        <result property="nidinr" column="nidinr" jdbcType="VARCHAR"/>
        <result property="trninr" column="trninr" jdbcType="VARCHAR"/>
        <result property="cxmflg" column="cxmflg" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        inr,quycod,ownref,cur,amt,opndat,expdat,warran,benefi,relflg,comdat,inifrm,nidinr,trninr,cxmflg
    </sql>

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

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

    <insert id="insert">
        insert into nidcxm (<include refid="Base_Column_List"/>)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{quycod,jdbcType=VARCHAR},
            #{ownref,jdbcType=VARCHAR},
            #{cur,jdbcType=VARCHAR},
            #{amt,jdbcType=DECIMAL},
            #{opndat,jdbcType=DATE},
            #{expdat,jdbcType=DATE},
            #{warran,jdbcType=VARCHAR},
            #{benefi,jdbcType=VARCHAR},
            #{relflg,jdbcType=VARCHAR},
            #{comdat,jdbcType=DATE},
            #{inifrm,jdbcType=VARCHAR},
            #{nidinr,jdbcType=VARCHAR},
            #{trninr,jdbcType=VARCHAR},
            #{cxmflg,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into nidcxm
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="quycod != null">quycod,</if>
            <if test="ownref != null">ownref,</if>
            <if test="cur != null">cur,</if>
            <if test="amt != null">amt,</if>
            <if test="opndat != null">opndat,</if>
            <if test="expdat != null">expdat,</if>
            <if test="warran != null">warran,</if>
            <if test="benefi != null">benefi,</if>
            <if test="relflg != null">relflg,</if>
            <if test="comdat != null">comdat,</if>
            <if test="inifrm != null">inifrm,</if>
            <if test="nidinr != null">nidinr,</if>
            <if test="trninr != null">trninr,</if>
            <if test="cxmflg != null">cxmflg,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR},</if>
            <if test="quycod != null">#{quycod,jdbcType=VARCHAR},</if>
            <if test="ownref != null">#{ownref,jdbcType=VARCHAR},</if>
            <if test="cur != null">#{cur,jdbcType=VARCHAR},</if>
            <if test="amt != null">#{amt,jdbcType=DECIMAL},</if>
            <if test="opndat != null">#{opndat,jdbcType=DATE},</if>
            <if test="expdat != null">#{expdat,jdbcType=DATE},</if>
            <if test="warran != null">#{warran,jdbcType=VARCHAR},</if>
            <if test="benefi != null">#{benefi,jdbcType=VARCHAR},</if>
            <if test="relflg != null">#{relflg,jdbcType=VARCHAR},</if>
            <if test="comdat != null">#{comdat,jdbcType=DATE},</if>
            <if test="inifrm != null">#{inifrm,jdbcType=VARCHAR},</if>
            <if test="nidinr != null">#{nidinr,jdbcType=VARCHAR},</if>
            <if test="trninr != null">#{trninr,jdbcType=VARCHAR},</if>
            <if test="cxmflg != null">#{cxmflg,jdbcType=VARCHAR},</if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update nidcxm
        <set>
            <if test="quycod != null">quycod = #{quycod,jdbcType=VARCHAR},</if>
            <if test="ownref != null">ownref = #{ownref,jdbcType=VARCHAR},</if>
            <if test="cur != null">cur = #{cur,jdbcType=VARCHAR},</if>
            <if test="amt != null">amt = #{amt,jdbcType=DECIMAL},</if>
            <if test="opndat != null">opndat = #{opndat,jdbcType=DATE},</if>
            <if test="expdat != null">expdat = #{expdat,jdbcType=DATE},</if>
            <if test="warran != null">warran = #{warran,jdbcType=VARCHAR},</if>
            <if test="benefi != null">benefi = #{benefi,jdbcType=VARCHAR},</if>
            <if test="relflg != null">relflg = #{relflg,jdbcType=VARCHAR},</if>
            <if test="comdat != null">comdat = #{comdat,jdbcType=DATE},</if>
            <if test="inifrm != null">inifrm = #{inifrm,jdbcType=VARCHAR},</if>
            <if test="nidinr != null">nidinr = #{nidinr,jdbcType=VARCHAR},</if>
            <if test="trninr != null">trninr = #{trninr,jdbcType=VARCHAR},</if>
            <if test="cxmflg != null">cxmflg = #{cxmflg,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update nidcxm
        <set>
            quycod = #{quycod,jdbcType=VARCHAR},
            ownref = #{ownref,jdbcType=VARCHAR},
            cur = #{cur,jdbcType=VARCHAR},
            amt = #{amt,jdbcType=DECIMAL},
            opndat = #{opndat,jdbcType=DATE},
            expdat = #{expdat,jdbcType=DATE},
            warran = #{warran,jdbcType=VARCHAR},
            benefi = #{benefi,jdbcType=VARCHAR},
            relflg = #{relflg,jdbcType=VARCHAR},
            comdat = #{comdat,jdbcType=DATE},
            inifrm = #{inifrm,jdbcType=VARCHAR},
            nidinr = #{nidinr,jdbcType=VARCHAR},
            trninr = #{trninr,jdbcType=VARCHAR},
            cxmflg = #{cxmflg,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 nidcxm
        <set>
            <if test="module.quycod != null">quycod = #{module.quycod,jdbcType=VARCHAR},</if>
            <if test="module.ownref != null">ownref = #{module.ownref,jdbcType=VARCHAR},</if>
            <if test="module.cur != null">cur = #{module.cur,jdbcType=VARCHAR},</if>
            <if test="module.amt != null">amt = #{module.amt,jdbcType=DECIMAL},</if>
            <if test="module.opndat != null">opndat = #{module.opndat,jdbcType=DATE},</if>
            <if test="module.expdat != null">expdat = #{module.expdat,jdbcType=DATE},</if>
            <if test="module.warran != null">warran = #{module.warran,jdbcType=VARCHAR},</if>
            <if test="module.benefi != null">benefi = #{module.benefi,jdbcType=VARCHAR},</if>
            <if test="module.relflg != null">relflg = #{module.relflg,jdbcType=VARCHAR},</if>
            <if test="module.comdat != null">comdat = #{module.comdat,jdbcType=DATE},</if>
            <if test="module.inifrm != null">inifrm = #{module.inifrm,jdbcType=VARCHAR},</if>
            <if test="module.nidinr != null">nidinr = #{module.nidinr,jdbcType=VARCHAR},</if>
            <if test="module.trninr != null">trninr = #{module.trninr,jdbcType=VARCHAR},</if>
            <if test="module.cxmflg != null">cxmflg = #{module.cxmflg,jdbcType=VARCHAR},</if>
        </set>
        ${conditions}
    </update>

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

    <select id="dyncRead" resultMap="BaseResultMap">
        ${sql}
    </select>

    <select id="getByMaxInr" resultMap="BaseResultMap">
        select max(inr) from nidcxm where nidinr=#{inr}
    </select>

    <select id="selectNidcxmByNidInr" resultMap="BaseResultMap">
        select <include refid="Base_Column_List"/>
        from nidcxm
        where nidinr = #{nidinr,jdbcType=VARCHAR}
    </select>

</mapper>