dbhmapper.xml 9.31 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 189 190 191 192 193 194 195 196 197 198 199 200 201
<?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.DbhMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.bopdecbo.Dbh">
        <result property="inr" column="inr" jdbcType="VARCHAR" />
        <result property="tmpref" column="tmpref" jdbcType="VARCHAR" />
        <result property="ownextkey" column="ownextkey" jdbcType="VARCHAR" />
        <result property="ver" column="ver" jdbcType="VARCHAR" />
        <result property="actiontype" column="actiontype" jdbcType="VARCHAR" />
        <result property="actiondesc" column="actiondesc" jdbcType="VARCHAR" />
        <result property="rptno" column="rptno" jdbcType="VARCHAR" />
        <result property="country" column="country" jdbcType="VARCHAR" />
        <result property="paytype" column="paytype" jdbcType="VARCHAR" />
        <result property="txcode" column="txcode" jdbcType="VARCHAR" />
        <result property="tc1amt" column="tc1amt" jdbcType="DECIMAL" />
        <result property="txrem" column="txrem" jdbcType="VARCHAR" />
        <result property="txcode2" column="txcode2" jdbcType="VARCHAR" />
        <result property="tc2amt" column="tc2amt" jdbcType="DECIMAL" />
        <result property="tx2rem" column="tx2rem" jdbcType="VARCHAR" />
        <result property="isref" column="isref" jdbcType="VARCHAR" />
        <result property="crtuser" column="crtuser" jdbcType="VARCHAR" />
        <result property="inptelc" column="inptelc" jdbcType="VARCHAR" />
        <result property="rptdate" column="rptdate" jdbcType="DATE" />
        <result property="regno" column="regno" jdbcType="VARCHAR" />
    </resultMap>

    <sql id="Base_Column_List">
        inr,tmpref,ownextkey,ver,actiontype,actiondesc,rptno,country,paytype,txcode,tc1amt,txrem,txcode2,tc2amt,tx2rem,isref,crtuser,inptelc,rptdate,regno
    </sql>

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

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

    <insert id="insert">
        insert into dbh (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{tmpref,jdbcType=VARCHAR},
            #{ownextkey,jdbcType=VARCHAR},
            #{ver,jdbcType=VARCHAR},
            #{actiontype,jdbcType=VARCHAR},
            #{actiondesc,jdbcType=VARCHAR},
            #{rptno,jdbcType=VARCHAR},
            #{country,jdbcType=VARCHAR},
            #{paytype,jdbcType=VARCHAR},
            #{txcode,jdbcType=VARCHAR},
            #{tc1amt,jdbcType=DECIMAL},
            #{txrem,jdbcType=VARCHAR},
            #{txcode2,jdbcType=VARCHAR},
            #{tc2amt,jdbcType=DECIMAL},
            #{tx2rem,jdbcType=VARCHAR},
            #{isref,jdbcType=VARCHAR},
            #{crtuser,jdbcType=VARCHAR},
            #{inptelc,jdbcType=VARCHAR},
            #{rptdate,jdbcType=DATE},
            #{regno,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into dbh
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="tmpref != null">tmpref,</if>
            <if test="ownextkey != null">ownextkey,</if>
            <if test="ver != null">ver,</if>
            <if test="actiontype != null">actiontype,</if>
            <if test="actiondesc != null">actiondesc,</if>
            <if test="rptno != null">rptno,</if>
            <if test="country != null">country,</if>
            <if test="paytype != null">paytype,</if>
            <if test="txcode != null">txcode,</if>
            <if test="tc1amt != null">tc1amt,</if>
            <if test="txrem != null">txrem,</if>
            <if test="txcode2 != null">txcode2,</if>
            <if test="tc2amt != null">tc2amt,</if>
            <if test="tx2rem != null">tx2rem,</if>
            <if test="isref != null">isref,</if>
            <if test="crtuser != null">crtuser,</if>
            <if test="inptelc != null">inptelc,</if>
            <if test="rptdate != null">rptdate,</if>
            <if test="regno != null">regno,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="tmpref != null">#{tmpref,jdbcType=VARCHAR}, </if>
            <if test="ownextkey != null">#{ownextkey,jdbcType=VARCHAR}, </if>
            <if test="ver != null">#{ver,jdbcType=VARCHAR}, </if>
            <if test="actiontype != null">#{actiontype,jdbcType=VARCHAR}, </if>
            <if test="actiondesc != null">#{actiondesc,jdbcType=VARCHAR}, </if>
            <if test="rptno != null">#{rptno,jdbcType=VARCHAR}, </if>
            <if test="country != null">#{country,jdbcType=VARCHAR}, </if>
            <if test="paytype != null">#{paytype,jdbcType=VARCHAR}, </if>
            <if test="txcode != null">#{txcode,jdbcType=VARCHAR}, </if>
            <if test="tc1amt != null">#{tc1amt,jdbcType=DECIMAL}, </if>
            <if test="txrem != null">#{txrem,jdbcType=VARCHAR}, </if>
            <if test="txcode2 != null">#{txcode2,jdbcType=VARCHAR}, </if>
            <if test="tc2amt != null">#{tc2amt,jdbcType=DECIMAL}, </if>
            <if test="tx2rem != null">#{tx2rem,jdbcType=VARCHAR}, </if>
            <if test="isref != null">#{isref,jdbcType=VARCHAR}, </if>
            <if test="crtuser != null">#{crtuser,jdbcType=VARCHAR}, </if>
            <if test="inptelc != null">#{inptelc,jdbcType=VARCHAR}, </if>
            <if test="rptdate != null">#{rptdate,jdbcType=DATE}, </if>
            <if test="regno != null">#{regno,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update dbh
        <set>
            <if test="tmpref != null">tmpref = #{tmpref,jdbcType=VARCHAR},</if>
            <if test="ownextkey != null">ownextkey = #{ownextkey,jdbcType=VARCHAR},</if>
            <if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if>
            <if test="actiontype != null">actiontype = #{actiontype,jdbcType=VARCHAR},</if>
            <if test="actiondesc != null">actiondesc = #{actiondesc,jdbcType=VARCHAR},</if>
            <if test="rptno != null">rptno = #{rptno,jdbcType=VARCHAR},</if>
            <if test="country != null">country = #{country,jdbcType=VARCHAR},</if>
            <if test="paytype != null">paytype = #{paytype,jdbcType=VARCHAR},</if>
            <if test="txcode != null">txcode = #{txcode,jdbcType=VARCHAR},</if>
            <if test="tc1amt != null">tc1amt = #{tc1amt,jdbcType=DECIMAL},</if>
            <if test="txrem != null">txrem = #{txrem,jdbcType=VARCHAR},</if>
            <if test="txcode2 != null">txcode2 = #{txcode2,jdbcType=VARCHAR},</if>
            <if test="tc2amt != null">tc2amt = #{tc2amt,jdbcType=DECIMAL},</if>
            <if test="tx2rem != null">tx2rem = #{tx2rem,jdbcType=VARCHAR},</if>
            <if test="isref != null">isref = #{isref,jdbcType=VARCHAR},</if>
            <if test="crtuser != null">crtuser = #{crtuser,jdbcType=VARCHAR},</if>
            <if test="inptelc != null">inptelc = #{inptelc,jdbcType=VARCHAR},</if>
            <if test="rptdate != null">rptdate = #{rptdate,jdbcType=DATE},</if>
            <if test="regno != null">regno = #{regno,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update dbh
        <set>
            tmpref = #{tmpref,jdbcType=VARCHAR},
            ownextkey = #{ownextkey,jdbcType=VARCHAR},
            ver = #{ver,jdbcType=VARCHAR},
            actiontype = #{actiontype,jdbcType=VARCHAR},
            actiondesc = #{actiondesc,jdbcType=VARCHAR},
            rptno = #{rptno,jdbcType=VARCHAR},
            country = #{country,jdbcType=VARCHAR},
            paytype = #{paytype,jdbcType=VARCHAR},
            txcode = #{txcode,jdbcType=VARCHAR},
            tc1amt = #{tc1amt,jdbcType=DECIMAL},
            txrem = #{txrem,jdbcType=VARCHAR},
            txcode2 = #{txcode2,jdbcType=VARCHAR},
            tc2amt = #{tc2amt,jdbcType=DECIMAL},
            tx2rem = #{tx2rem,jdbcType=VARCHAR},
            isref = #{isref,jdbcType=VARCHAR},
            crtuser = #{crtuser,jdbcType=VARCHAR},
            inptelc = #{inptelc,jdbcType=VARCHAR},
            rptdate = #{rptdate,jdbcType=DATE},
            regno = #{regno,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>

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

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

    <select id="selectByRptnoAndTmpref" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from dbh
        where rptno = #{rptno} and tmpref=#{tmpref}
    </select>

    <select id="selectByTmpref" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from dbh
        where tmpref=#{tmpref}
    </select>

</mapper>