tekmapper.xml 8.11 KB
<?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.TekMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.common.rmbbop.entity.Tek">
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="ver" column="ver" jdbcType="VARCHAR"/>
        <result property="sta" column="sta" jdbcType="VARCHAR"/>
        <result property="objtyp" column="objtyp" jdbcType="VARCHAR"/>
        <result property="objinr" column="objinr" jdbcType="VARCHAR"/>
        <result property="listopertype" column="listopertype" jdbcType="VARCHAR"/>
        <result property="csta" column="csta" jdbcType="VARCHAR"/>
        <result property="seqno" column="seqno" jdbcType="VARCHAR"/>
        <result property="outbankcode" column="outbankcode" jdbcType="VARCHAR"/>
        <result property="outcountrycode" column="outcountrycode" jdbcType="VARCHAR"/>
        <result property="inorgname" column="inorgname" jdbcType="VARCHAR"/>
        <result property="incountrycode" column="incountrycode" jdbcType="VARCHAR"/>
        <result property="contractamt" column="contractamt" jdbcType="DECIMAL"/>
    </resultMap>

    <sql id="Base_Column_List">
        inr,ver,sta,objtyp,objinr,listopertype,csta,seqno,outbankcode,outcountrycode,inorgname,incountrycode,contractamt
    </sql>

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

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

    <insert id="insert">
        insert into tek (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{ver,jdbcType=VARCHAR},
            #{sta,jdbcType=VARCHAR},
            #{objtyp,jdbcType=VARCHAR},
            #{objinr,jdbcType=VARCHAR},
            #{listopertype,jdbcType=VARCHAR},
            #{csta,jdbcType=VARCHAR},
            #{seqno,jdbcType=VARCHAR},
            #{outbankcode,jdbcType=VARCHAR},
            #{outcountrycode,jdbcType=VARCHAR},
            #{inorgname,jdbcType=VARCHAR},
            #{incountrycode,jdbcType=VARCHAR},
            #{contractamt,jdbcType=DECIMAL},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into tek
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="ver != null">ver,</if>
            <if test="sta != null">sta,</if>
            <if test="objtyp != null">objtyp,</if>
            <if test="objinr != null">objinr,</if>
            <if test="listopertype != null">listopertype,</if>
            <if test="csta != null">csta,</if>
            <if test="seqno != null">seqno,</if>
            <if test="outbankcode != null">outbankcode,</if>
            <if test="outcountrycode != null">outcountrycode,</if>
            <if test="inorgname != null">inorgname,</if>
            <if test="incountrycode != null">incountrycode,</if>
            <if test="contractamt != null">contractamt,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR},</if>
            <if test="ver != null">#{ver,jdbcType=VARCHAR},</if>
            <if test="sta != null">#{sta,jdbcType=VARCHAR},</if>
            <if test="objtyp != null">#{objtyp,jdbcType=VARCHAR},</if>
            <if test="objinr != null">#{objinr,jdbcType=VARCHAR},</if>
            <if test="listopertype != null">#{listopertype,jdbcType=VARCHAR},</if>
            <if test="csta != null">#{csta,jdbcType=VARCHAR},</if>
            <if test="seqno != null">#{seqno,jdbcType=VARCHAR},</if>
            <if test="outbankcode != null">#{outbankcode,jdbcType=VARCHAR},</if>
            <if test="outcountrycode != null">#{outcountrycode,jdbcType=VARCHAR},</if>
            <if test="inorgname != null">#{inorgname,jdbcType=VARCHAR},</if>
            <if test="incountrycode != null">#{incountrycode,jdbcType=VARCHAR},</if>
            <if test="contractamt != null">#{contractamt,jdbcType=DECIMAL},</if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update tek
        <set>
            <if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if>
            <if test="sta != null">sta = #{sta,jdbcType=VARCHAR},</if>
            <if test="objtyp != null">objtyp = #{objtyp,jdbcType=VARCHAR},</if>
            <if test="objinr != null">objinr = #{objinr,jdbcType=VARCHAR},</if>
            <if test="listopertype != null">listopertype = #{listopertype,jdbcType=VARCHAR},</if>
            <if test="csta != null">csta = #{csta,jdbcType=VARCHAR},</if>
            <if test="seqno != null">seqno = #{seqno,jdbcType=VARCHAR},</if>
            <if test="outbankcode != null">outbankcode = #{outbankcode,jdbcType=VARCHAR},</if>
            <if test="outcountrycode != null">outcountrycode = #{outcountrycode,jdbcType=VARCHAR},</if>
            <if test="inorgname != null">inorgname = #{inorgname,jdbcType=VARCHAR},</if>
            <if test="incountrycode != null">incountrycode = #{incountrycode,jdbcType=VARCHAR},</if>
            <if test="contractamt != null">contractamt = #{contractamt,jdbcType=DECIMAL},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update tej
        <set>
            ver =  #{ver,jdbcType=VARCHAR},
            sta = #{sta,jdbcType=VARCHAR},
            objtyp = #{objtyp,jdbcType=VARCHAR},
            objinr = #{objinr,jdbcType=VARCHAR},
            listopertype = #{listopertype,jdbcType=VARCHAR},
            csta = #{csta,jdbcType=VARCHAR},
            seqno = #{seqno,jdbcType=VARCHAR},
            outbankcode = #{outbankcode,jdbcType=VARCHAR},
            outcountrycode = #{outcountrycode,jdbcType=VARCHAR},
            inorgname = #{inorgname,jdbcType=VARCHAR},
            incountrycode = #{incountrycode,jdbcType=VARCHAR},
            contractamt = #{contractamt,jdbcType=DECIMAL},
        </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 tek
        <set>
            <if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if>
            <if test="sta != null">sta = #{sta,jdbcType=VARCHAR},</if>
            <if test="objtyp != null">objtyp = #{objtyp,jdbcType=VARCHAR},</if>
            <if test="objinr != null">objinr = #{objinr,jdbcType=VARCHAR},</if>
            <if test="listopertype != null">listopertype = #{listopertype,jdbcType=VARCHAR},</if>
            <if test="csta != null">csta = #{csta,jdbcType=VARCHAR},</if>
            <if test="seqno != null">seqno = #{seqno,jdbcType=VARCHAR},</if>
            <if test="outbankcode != null">outbankcode = #{outbankcode,jdbcType=VARCHAR},</if>
            <if test="outcountrycode != null">outcountrycode = #{outcountrycode,jdbcType=VARCHAR},</if>
            <if test="inorgname != null">inorgname = #{inorgname,jdbcType=VARCHAR},</if>
            <if test="incountrycode != null">incountrycode = #{incountrycode,jdbcType=VARCHAR},</if>
            <if test="contractamt != null">contractamt = #{contractamt,jdbcType=DECIMAL},</if>
        </set>
        ${conditions}
    </update>

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

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

    <select id="selectByObjtypAndObjinr" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from tek
        where 1=1 and objinr = #{objinr,jdbcType=VARCHAR} and objtyp = #{objtyp,jdbcType=VARCHAR}
    </select>

    <delete id="deleteByobjtypAndobjinr">
        delete from tek
        where objtyp = #{objtyp,jdbcType=VARCHAR} and objinr = #{objinr,jdbcType=VARCHAR}
    </delete>
</mapper>