txpregmapper.xml 5.61 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
<?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.TxpregMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Txpreg">
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="txfinr" column="txfinr" jdbcType="VARCHAR"/>
        <result property="rcrdno" column="rcrdno" jdbcType="VARCHAR"/>
        <result property="bsnsrlno" column="bsnsrlno" jdbcType="VARCHAR"/>
        <result property="itnlincmpaydclrtnno" column="itnlincmpaydclrtnno" jdbcType="VARCHAR"/>
        <result property="txncd" column="txncd" jdbcType="VARCHAR"/>
        <result property="txnccy" column="txnccy" jdbcType="VARCHAR"/>
        <result property="pymtamt" column="pymtamt" jdbcType="DECIMAL"/>
        <result property="rmk" column="rmk" jdbcType="VARCHAR"/>
        <result property="trninr" column="trninr" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        inr,txfinr,rcrdno,bsnsrlno,itnlincmpaydclrtnno,txncd,txnccy,pymtamt,rmk,trninr
    </sql>

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

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

    <insert id="insert">
        insert into txpreg (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{txfinr,jdbcType=VARCHAR},
            #{rcrdno,jdbcType=VARCHAR},
            #{bsnsrlno,jdbcType=VARCHAR},
            #{itnlincmpaydclrtnno,jdbcType=VARCHAR},
            #{txncd,jdbcType=VARCHAR},
            #{txnccy,jdbcType=VARCHAR},
            #{pymtamt,jdbcType=DECIMAL},
            #{rmk,jdbcType=VARCHAR},
            #{trninr,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into txpreg
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="txfinr != null">txfinr,</if>
            <if test="rcrdno != null">rcrdno,</if>
            <if test="bsnsrlno != null">bsnsrlno,</if>
            <if test="itnlincmpaydclrtnno != null">itnlincmpaydclrtnno,</if>
            <if test="txncd != null">txncd,</if>
            <if test="txnccy != null">txnccy,</if>
            <if test="pymtamt != null">pymtamt,</if>
            <if test="rmk != null">rmk,</if>
            <if test="trninr != null">trninr,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="txfinr != null">#{txfinr,jdbcType=VARCHAR}, </if>
            <if test="rcrdno != null">#{rcrdno,jdbcType=VARCHAR}, </if>
            <if test="bsnsrlno != null">#{bsnsrlno,jdbcType=VARCHAR}, </if>
            <if test="itnlincmpaydclrtnno != null">#{itnlincmpaydclrtnno,jdbcType=VARCHAR}, </if>
            <if test="txncd != null">#{txncd,jdbcType=VARCHAR}, </if>
            <if test="txnccy != null">#{txnccy,jdbcType=VARCHAR}, </if>
            <if test="pymtamt != null">#{pymtamt,jdbcType=DECIMAL}, </if>
            <if test="rmk != null">#{rmk,jdbcType=VARCHAR}, </if>
            <if test="trninr != null">#{trninr,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update txpreg
        <set>
            <if test="txfinr != null">txfinr = #{txfinr,jdbcType=VARCHAR},</if>
            <if test="rcrdno != null">rcrdno = #{rcrdno,jdbcType=VARCHAR},</if>
            <if test="bsnsrlno != null">bsnsrlno = #{bsnsrlno,jdbcType=VARCHAR},</if>
            <if test="itnlincmpaydclrtnno != null">itnlincmpaydclrtnno = #{itnlincmpaydclrtnno,jdbcType=VARCHAR},</if>
            <if test="txncd != null">txncd = #{txncd,jdbcType=VARCHAR},</if>
            <if test="txnccy != null">txnccy = #{txnccy,jdbcType=VARCHAR},</if>
            <if test="pymtamt != null">pymtamt = #{pymtamt,jdbcType=DECIMAL},</if>
            <if test="rmk != null">rmk = #{rmk,jdbcType=VARCHAR},</if>
            <if test="trninr != null">trninr = #{trninr,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update txpreg
        <set>
            txfinr = #{txfinr,jdbcType=VARCHAR},
            rcrdno = #{rcrdno,jdbcType=VARCHAR},
            bsnsrlno = #{bsnsrlno,jdbcType=VARCHAR},
            itnlincmpaydclrtnno = #{itnlincmpaydclrtnno,jdbcType=VARCHAR},
            txncd = #{txncd,jdbcType=VARCHAR},
            txnccy = #{txnccy,jdbcType=VARCHAR},
            pymtamt = #{pymtamt,jdbcType=DECIMAL},
            rmk = #{rmk,jdbcType=VARCHAR},
            trninr = #{trninr,jdbcType=VARCHAR},
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <select id="selectByTxfinr" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from txpreg
        where txfinr = #{txfinr,jdbcType=VARCHAR}
    </select>


    <select id="selectByBsnsrlno" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from txpreg
        where bsnsrlno = #{bsnsrlno,jdbcType=VARCHAR} and trninr != ''
    </select>

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


</mapper>