bptmapper.xml 3.5 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
<?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.BptMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Bpt">
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="fldmodblk" column="fldmodblk" jdbcType="VARCHAR"/>
        <result property="contag72" column="contag72" jdbcType="VARCHAR"/>
        <result property="contag79" column="contag79" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        inr,fldmodblk,contag72,contag79
    </sql>

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

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

    <insert id="insert">
        insert into bpt (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{fldmodblk,jdbcType=VARCHAR},
            #{contag72,jdbcType=VARCHAR},
            #{contag79,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into bpt
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="fldmodblk != null">fldmodblk,</if>
            <if test="contag72 != null">contag72,</if>
            <if test="contag79 != null">contag79,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="fldmodblk != null">#{fldmodblk,jdbcType=VARCHAR}, </if>
            <if test="contag72 != null">#{contag72,jdbcType=VARCHAR}, </if>
            <if test="contag79 != null">#{contag79,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update bpt
        <set>
            <if test="fldmodblk != null">fldmodblk = #{fldmodblk,jdbcType=VARCHAR},</if>
            <if test="contag72 != null">contag72 = #{contag72,jdbcType=VARCHAR},</if>
            <if test="contag79 != null">contag79 = #{contag79,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update bpt
        <set>
            fldmodblk = #{fldmodblk,jdbcType=VARCHAR},
            contag72 = #{contag72,jdbcType=VARCHAR},
            contag79 = #{contag79,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 bpt
        <set>
            <if test="module.fldmodblk != null">fldmodblk = #{module.fldmodblk,jdbcType=VARCHAR},</if>
            <if test="module.contag72 != null">contag72 = #{module.contag72,jdbcType=VARCHAR},</if>
            <if test="module.contag79 != null">contag79 = #{module.contag79,jdbcType=VARCHAR},</if>
        </set>
        ${conditions}
    </update>

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

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

</mapper>