autosigncountptymapper.xml 4.68 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
<?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.AutoSignCountPtyMapper">

    <resultMap id="baseResultMap" type="com.brilliance.isc.bo.auto.AutoSignCountPty">
        <result column="INR" property="inr" jdbcType="VARCHAR"/>
        <result column="signinfoinr" property="signinfoinr" jdbcType="VARCHAR"/>
        <result column="opnbchkey" property="opnbchkey" jdbcType="VARCHAR"/>
        <result column="ctycod" property="ctycod" jdbcType="VARCHAR"/>
        <result column="act" property="act" jdbcType="VARCHAR"/>
        <result column="cur" property="cur" jdbcType="VARCHAR"/>
        <result column="nam" property="nam" jdbcType="VARCHAR"/>
    </resultMap>



    <sql id="autosigncountpty_column">
        inr,
        signinfoinr,
        opnbchkey,
        ctycod,
        act,
        cur,
        nam
    </sql>

    <select id="selectOneByInr" resultMap="baseResultMap">
        select
        <include refid="autosigncountpty_column"/>
        from AUTO_SIGN_COUNTPTY
        where inr = #{inr,jdbcType=VARCHAR}
    </select>

    <select id="selectOneByVo" resultMap="baseResultMap">
        select
        <include refid="autosigncountpty_column"/>
        from AUTO_SIGN_COUNTPTY
        <where>
            <if test="vo.opnbchkey != null and vo.opnbchkey != ''">
                and opnbchkey = #{vo.opnbchkey,jdbcType=VARCHAR}
            </if>
            <if test="vo.ctycod != null and vo.ctycod != ''">
                and ctycod = #{vo.ctycod,jdbcType=VARCHAR}
            </if>
            <if test="vo.act != null and vo.act != ''">
                and act = #{vo.act,jdbcType=VARCHAR}
            </if>
            <if test="vo.cur != null and vo.cur != ''">
                and cur = #{vo.cur,jdbcType=VARCHAR}
            </if>
            <if test="vo.nam != null and vo.nam != ''">
                and nam = #{vo.nam,jdbcType=VARCHAR}
            </if>
            <if test="vo.signinfoinr != null and vo.signinfoinr != ''">
                and signinfoinr = #{vo.signinfoinr,jdbcType=VARCHAR}
            </if>
        </where>
        limit 1
    </select>

    <insert id="insert">
        insert into AUTO_SIGN_COUNTPTY (<include refid="autosigncountpty_column"/>)
        values (
        #{vo.inr,jdbcType=VARCHAR},
        #{vo.signinfoinr,jdbcType=VARCHAR},
        #{vo.opnbchkey,jdbcType=VARCHAR},
        #{vo.ctycod,jdbcType=VARCHAR},
        #{vo.act,jdbcType=VARCHAR},
        #{vo.cur,jdbcType=VARCHAR},
        #{vo.nam,jdbcType=VARCHAR}
        )
    </insert>

    <update id="update">
        update AUTO_SIGN_COUNTPTY
        <set>
            opnbchkey = #{vo.opnbchkey,jdbcType=VARCHAR},
            ctycod = #{vo.ctycod,jdbcType=VARCHAR},
            act = #{vo.act,jdbcType=VARCHAR},
            cur = #{vo.cur,jdbcType=VARCHAR},
            nam = #{vo.nam,jdbcType=VARCHAR},
        </set>
        <where>
            INR = #{vo.inr,jdbcType=VARCHAR}
        </where>
    </update>

    <select id="selectList" resultMap="baseResultMap">
        select
        <include refid="autosigncountpty_column"/>
        from AUTO_SIGN_COUNTPTY
        WHERE 1=1
        <if test='vo.opnbchkey != null and vo.opnbchkey != ""'>
            and opnbchkey= #{vo.opnbchkey}
        </if>
        <if test="vo.ctycod != null and vo.ctycod !=''">
            and ctycod= #{vo.ctycod}
        </if>
        <if test="vo.act != null and vo.act != ''">
            and act= #{vo.act}
        </if>
        <if test="vo.cur != null and vo.cur !=''">
            and cur= #{vo.cur}
        </if>
        <if test="vo.nam != null and vo.nam != ''">
            and nam= #{vo.nam}
        </if>
        <if test="vo.signinfoinr != null and vo.signinfoinr != ''">
            and signinfoinr= #{vo.signinfoinr}
        </if>
    </select>

    <select id="selectByCon" resultMap="baseResultMap">
        ${sql}
    </select>

    <delete id="deleteByIds">
        delete from AUTO_SIGN_COUNTPTY where inr in
        <foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <delete id="deleteBySigninfoinrs">
        delete from AUTO_SIGN_COUNTPTY where signinfoinr in
        <foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

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

    <delete id="deleteBySigninfoinr">
        delete from AUTO_SIGN_COUNTPTY
        where signinfoinr = #{signinfoinr,jdbcType=VARCHAR}
    </delete>
</mapper>