ntfmapper.xml 7.01 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.NtfMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Ntf">
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="usr" column="usr" jdbcType="VARCHAR"/>
        <result property="ssninr" column="ssninr" jdbcType="VARCHAR"/>
        <result property="typ" column="typ" jdbcType="VARCHAR"/>
        <result property="dattim" column="dattim" jdbcType="DATE"/>
        <result property="expdattim" column="expdattim" jdbcType="DATE"/>
        <result property="txt" column="txt" jdbcType="VARCHAR"/>
        <result property="shwdattim" column="shwdattim" jdbcType="DATE"/>
        <result property="shwssninr" column="shwssninr" jdbcType="VARCHAR"/>
        <result property="shwflg" column="shwflg" jdbcType="VARCHAR"/>
        <result property="iniusr" column="iniusr" jdbcType="VARCHAR"/>
        <result property="inissninr" column="inissninr" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        inr,usr,ssninr,typ,dattim,expdattim,txt,shwdattim,shwssninr,shwflg,iniusr,inissninr
    </sql>

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

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

    <insert id="insert">
        insert into ntf (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{usr,jdbcType=VARCHAR},
            #{ssninr,jdbcType=VARCHAR},
            #{typ,jdbcType=VARCHAR},
            #{dattim,jdbcType=DATE},
            #{expdattim,jdbcType=DATE},
            #{txt,jdbcType=VARCHAR},
            #{shwdattim,jdbcType=DATE},
            #{shwssninr,jdbcType=VARCHAR},
            #{shwflg,jdbcType=VARCHAR},
            #{iniusr,jdbcType=VARCHAR},
            #{inissninr,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into ntf
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="usr != null">usr,</if>
            <if test="ssninr != null">ssninr,</if>
            <if test="typ != null">typ,</if>
            <if test="dattim != null">dattim,</if>
            <if test="expdattim != null">expdattim,</if>
            <if test="txt != null">txt,</if>
            <if test="shwdattim != null">shwdattim,</if>
            <if test="shwssninr != null">shwssninr,</if>
            <if test="shwflg != null">shwflg,</if>
            <if test="iniusr != null">iniusr,</if>
            <if test="inissninr != null">inissninr,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="usr != null">#{usr,jdbcType=VARCHAR}, </if>
            <if test="ssninr != null">#{ssninr,jdbcType=VARCHAR}, </if>
            <if test="typ != null">#{typ,jdbcType=VARCHAR}, </if>
            <if test="dattim != null">#{dattim,jdbcType=DATE}, </if>
            <if test="expdattim != null">#{expdattim,jdbcType=DATE}, </if>
            <if test="txt != null">#{txt,jdbcType=VARCHAR}, </if>
            <if test="shwdattim != null">#{shwdattim,jdbcType=DATE}, </if>
            <if test="shwssninr != null">#{shwssninr,jdbcType=VARCHAR}, </if>
            <if test="shwflg != null">#{shwflg,jdbcType=VARCHAR}, </if>
            <if test="iniusr != null">#{iniusr,jdbcType=VARCHAR}, </if>
            <if test="inissninr != null">#{inissninr,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update ntf
        <set>
            <if test="usr != null">usr = #{usr,jdbcType=VARCHAR},</if>
            <if test="ssninr != null">ssninr = #{ssninr,jdbcType=VARCHAR},</if>
            <if test="typ != null">typ = #{typ,jdbcType=VARCHAR},</if>
            <if test="dattim != null">dattim = #{dattim,jdbcType=DATE},</if>
            <if test="expdattim != null">expdattim = #{expdattim,jdbcType=DATE},</if>
            <if test="txt != null">txt = #{txt,jdbcType=VARCHAR},</if>
            <if test="shwdattim != null">shwdattim = #{shwdattim,jdbcType=DATE},</if>
            <if test="shwssninr != null">shwssninr = #{shwssninr,jdbcType=VARCHAR},</if>
            <if test="shwflg != null">shwflg = #{shwflg,jdbcType=VARCHAR},</if>
            <if test="iniusr != null">iniusr = #{iniusr,jdbcType=VARCHAR},</if>
            <if test="inissninr != null">inissninr = #{inissninr,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update ntf
        <set>
            usr = #{usr,jdbcType=VARCHAR},
            ssninr = #{ssninr,jdbcType=VARCHAR},
            typ = #{typ,jdbcType=VARCHAR},
            dattim = #{dattim,jdbcType=DATE},
            expdattim = #{expdattim,jdbcType=DATE},
            txt = #{txt,jdbcType=VARCHAR},
            shwdattim = #{shwdattim,jdbcType=DATE},
            shwssninr = #{shwssninr,jdbcType=VARCHAR},
            shwflg = #{shwflg,jdbcType=VARCHAR},
            iniusr = #{iniusr,jdbcType=VARCHAR},
            inissninr = #{inissninr,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 ntf
        <set>
            <if test="module.usr != null">usr = #{module.usr,jdbcType=VARCHAR},</if>
            <if test="module.ssninr != null">ssninr = #{module.ssninr,jdbcType=VARCHAR},</if>
            <if test="module.typ != null">typ = #{module.typ,jdbcType=VARCHAR},</if>
            <if test="module.dattim != null">dattim = #{module.dattim,jdbcType=DATE},</if>
            <if test="module.expdattim != null">expdattim = #{module.expdattim,jdbcType=DATE},</if>
            <if test="module.txt != null">txt = #{module.txt,jdbcType=VARCHAR},</if>
            <if test="module.shwdattim != null">shwdattim = #{module.shwdattim,jdbcType=DATE},</if>
            <if test="module.shwssninr != null">shwssninr = #{module.shwssninr,jdbcType=VARCHAR},</if>
            <if test="module.shwflg != null">shwflg = #{module.shwflg,jdbcType=VARCHAR},</if>
            <if test="module.iniusr != null">iniusr = #{module.iniusr,jdbcType=VARCHAR},</if>
            <if test="module.inissninr != null">inissninr = #{module.inissninr,jdbcType=VARCHAR},</if>
        </set>
        ${conditions}
    </update>

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

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

</mapper>