usrsigmapper.xml 4.67 KB
Newer Older
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
<?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.ceb.gjjs.mda.dao.UsrsigMapper">

    <resultMap id="BaseResultMap" type="com.ceb.gjjs.mda.bo.Usrsig">
        <result property="inr" column="inr" jdbcType="VARCHAR" />
        <result property="dattim" column="dattim" jdbcType="DATE" />
        <result property="frm" column="frm" jdbcType="VARCHAR" />
        <result property="lvl" column="lvl" jdbcType="VARCHAR" />
        <result property="ownref" column="ownref" jdbcType="VARCHAR" />
        <result property="sig" column="sig" jdbcType="VARCHAR" />
        <result property="sta" column="sta" jdbcType="VARCHAR" />
        <result property="trninr" column="trninr" jdbcType="VARCHAR" />
        <result property="usrinr" column="usrinr" jdbcType="VARCHAR" />
    </resultMap>

    <sql id="Base_Column_List">
        inr,dattim,frm,lvl,ownref,sig,sta,trninr,usrinr
    </sql>

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

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

    <insert id="insert">
        insert into usrsig (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{dattim,jdbcType=DATE},
            #{frm,jdbcType=VARCHAR},
            #{lvl,jdbcType=VARCHAR},
            #{ownref,jdbcType=VARCHAR},
            #{sig,jdbcType=VARCHAR},
            #{sta,jdbcType=VARCHAR},
            #{trninr,jdbcType=VARCHAR},
            #{usrinr,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into usrsig
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="dattim != null">dattim,</if>
            <if test="frm != null">frm,</if>
            <if test="lvl != null">lvl,</if>
            <if test="ownref != null">ownref,</if>
            <if test="sig != null">sig,</if>
            <if test="sta != null">sta,</if>
            <if test="trninr != null">trninr,</if>
            <if test="usrinr != null">usrinr,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="dattim != null">#{dattim,jdbcType=DATE}, </if>
            <if test="frm != null">#{frm,jdbcType=VARCHAR}, </if>
            <if test="lvl != null">#{lvl,jdbcType=VARCHAR}, </if>
            <if test="ownref != null">#{ownref,jdbcType=VARCHAR}, </if>
            <if test="sig != null">#{sig,jdbcType=VARCHAR}, </if>
            <if test="sta != null">#{sta,jdbcType=VARCHAR}, </if>
            <if test="trninr != null">#{trninr,jdbcType=VARCHAR}, </if>
            <if test="usrinr != null">#{usrinr,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update usrsig
        <set>
            <if test="dattim != null">dattim = #{dattim,jdbcType=DATE},</if>
            <if test="frm != null">frm = #{frm,jdbcType=VARCHAR},</if>
            <if test="lvl != null">lvl = #{lvl,jdbcType=VARCHAR},</if>
            <if test="ownref != null">ownref = #{ownref,jdbcType=VARCHAR},</if>
            <if test="sig != null">sig = #{sig,jdbcType=VARCHAR},</if>
            <if test="sta != null">sta = #{sta,jdbcType=VARCHAR},</if>
            <if test="trninr != null">trninr = #{trninr,jdbcType=VARCHAR},</if>
            <if test="usrinr != null">usrinr = #{usrinr,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update usrsig
        <set>
            dattim = #{dattim,jdbcType=DATE},
            frm = #{frm,jdbcType=VARCHAR},
            lvl = #{lvl,jdbcType=VARCHAR},
            ownref = #{ownref,jdbcType=VARCHAR},
            sig = #{sig,jdbcType=VARCHAR},
            sta = #{sta,jdbcType=VARCHAR},
            trninr = #{trninr,jdbcType=VARCHAR},
            usrinr = #{usrinr,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>

</mapper>