dgcmapper.xml 8.62 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.DgcMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Dgc">
        <result property="yngyjg" column="yngyjg" jdbcType="VARCHAR"/>
        <result property="biccod" column="biccod" jdbcType="VARCHAR"/>
        <result property="jieddm" column="jieddm" jdbcType="VARCHAR"/>
        <result property="daxibz" column="daxibz" jdbcType="VARCHAR"/>
        <result property="jigomc" column="jigomc" jdbcType="VARCHAR"/>
        <result property="zhhbic" column="zhhbic" jdbcType="VARCHAR"/>
        <result property="qiynbz" column="qiynbz" jdbcType="VARCHAR"/>
        <result property="beiy01" column="beiy01" jdbcType="VARCHAR"/>
        <result property="beiy02" column="beiy02" jdbcType="VARCHAR"/>
        <result property="beiy03" column="beiy03" jdbcType="VARCHAR"/>
        <result property="xinx01" column="xinx01" jdbcType="VARCHAR"/>
        <result property="xinx02" column="xinx02" jdbcType="VARCHAR"/>
        <result property="xinx03" column="xinx03" jdbcType="VARCHAR"/>
        <result property="shjnch" column="shjnch" jdbcType="NUMERIC"/>
        <result property="jiluzt" column="jiluzt" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        yngyjg,biccod,jieddm,daxibz,jigomc,zhhbic,qiynbz,beiy01,beiy02,beiy03,xinx01,xinx02,xinx03,shjnch,jiluzt
    </sql>

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

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

    <insert id="insert">
        insert into dgc (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{yngyjg,jdbcType=VARCHAR},
            #{biccod,jdbcType=VARCHAR},
            #{jieddm,jdbcType=VARCHAR},
            #{daxibz,jdbcType=VARCHAR},
            #{jigomc,jdbcType=VARCHAR},
            #{zhhbic,jdbcType=VARCHAR},
            #{qiynbz,jdbcType=VARCHAR},
            #{beiy01,jdbcType=VARCHAR},
            #{beiy02,jdbcType=VARCHAR},
            #{beiy03,jdbcType=VARCHAR},
            #{xinx01,jdbcType=VARCHAR},
            #{xinx02,jdbcType=VARCHAR},
            #{xinx03,jdbcType=VARCHAR},
            #{shjnch,jdbcType=NUMERIC},
            #{jiluzt,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into dgc
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="yngyjg != null">yngyjg,</if>
            <if test="biccod != null">biccod,</if>
            <if test="jieddm != null">jieddm,</if>
            <if test="daxibz != null">daxibz,</if>
            <if test="jigomc != null">jigomc,</if>
            <if test="zhhbic != null">zhhbic,</if>
            <if test="qiynbz != null">qiynbz,</if>
            <if test="beiy01 != null">beiy01,</if>
            <if test="beiy02 != null">beiy02,</if>
            <if test="beiy03 != null">beiy03,</if>
            <if test="xinx01 != null">xinx01,</if>
            <if test="xinx02 != null">xinx02,</if>
            <if test="xinx03 != null">xinx03,</if>
            <if test="shjnch != null">shjnch,</if>
            <if test="jiluzt != null">jiluzt,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="yngyjg != null">#{yngyjg,jdbcType=VARCHAR}, </if>
            <if test="biccod != null">#{biccod,jdbcType=VARCHAR}, </if>
            <if test="jieddm != null">#{jieddm,jdbcType=VARCHAR}, </if>
            <if test="daxibz != null">#{daxibz,jdbcType=VARCHAR}, </if>
            <if test="jigomc != null">#{jigomc,jdbcType=VARCHAR}, </if>
            <if test="zhhbic != null">#{zhhbic,jdbcType=VARCHAR}, </if>
            <if test="qiynbz != null">#{qiynbz,jdbcType=VARCHAR}, </if>
            <if test="beiy01 != null">#{beiy01,jdbcType=VARCHAR}, </if>
            <if test="beiy02 != null">#{beiy02,jdbcType=VARCHAR}, </if>
            <if test="beiy03 != null">#{beiy03,jdbcType=VARCHAR}, </if>
            <if test="xinx01 != null">#{xinx01,jdbcType=VARCHAR}, </if>
            <if test="xinx02 != null">#{xinx02,jdbcType=VARCHAR}, </if>
            <if test="xinx03 != null">#{xinx03,jdbcType=VARCHAR}, </if>
            <if test="shjnch != null">#{shjnch,jdbcType=NUMERIC}, </if>
            <if test="jiluzt != null">#{jiluzt,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update dgc
        <set>
            <if test="yngyjg != null">yngyjg = #{yngyjg,jdbcType=VARCHAR},</if>
            <if test="biccod != null">biccod = #{biccod,jdbcType=VARCHAR},</if>
            <if test="jieddm != null">jieddm = #{jieddm,jdbcType=VARCHAR},</if>
            <if test="daxibz != null">daxibz = #{daxibz,jdbcType=VARCHAR},</if>
            <if test="jigomc != null">jigomc = #{jigomc,jdbcType=VARCHAR},</if>
            <if test="zhhbic != null">zhhbic = #{zhhbic,jdbcType=VARCHAR},</if>
            <if test="qiynbz != null">qiynbz = #{qiynbz,jdbcType=VARCHAR},</if>
            <if test="beiy01 != null">beiy01 = #{beiy01,jdbcType=VARCHAR},</if>
            <if test="beiy02 != null">beiy02 = #{beiy02,jdbcType=VARCHAR},</if>
            <if test="beiy03 != null">beiy03 = #{beiy03,jdbcType=VARCHAR},</if>
            <if test="xinx01 != null">xinx01 = #{xinx01,jdbcType=VARCHAR},</if>
            <if test="xinx02 != null">xinx02 = #{xinx02,jdbcType=VARCHAR},</if>
            <if test="xinx03 != null">xinx03 = #{xinx03,jdbcType=VARCHAR},</if>
            <if test="shjnch != null">shjnch = #{shjnch,jdbcType=NUMERIC},</if>
            <if test="jiluzt != null">jiluzt = #{jiluzt,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update dgc
        <set>
            yngyjg = #{yngyjg,jdbcType=VARCHAR},
            biccod = #{biccod,jdbcType=VARCHAR},
            jieddm = #{jieddm,jdbcType=VARCHAR},
            daxibz = #{daxibz,jdbcType=VARCHAR},
            jigomc = #{jigomc,jdbcType=VARCHAR},
            zhhbic = #{zhhbic,jdbcType=VARCHAR},
            qiynbz = #{qiynbz,jdbcType=VARCHAR},
            beiy01 = #{beiy01,jdbcType=VARCHAR},
            beiy02 = #{beiy02,jdbcType=VARCHAR},
            beiy03 = #{beiy03,jdbcType=VARCHAR},
            xinx01 = #{xinx01,jdbcType=VARCHAR},
            xinx02 = #{xinx02,jdbcType=VARCHAR},
            xinx03 = #{xinx03,jdbcType=VARCHAR},
            shjnch = #{shjnch,jdbcType=NUMERIC},
            jiluzt = #{jiluzt,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 dgc
        <set>
            <if test="module.yngyjg != null">yngyjg = #{module.yngyjg,jdbcType=VARCHAR},</if>
            <if test="module.biccod != null">biccod = #{module.biccod,jdbcType=VARCHAR},</if>
            <if test="module.jieddm != null">jieddm = #{module.jieddm,jdbcType=VARCHAR},</if>
            <if test="module.daxibz != null">daxibz = #{module.daxibz,jdbcType=VARCHAR},</if>
            <if test="module.jigomc != null">jigomc = #{module.jigomc,jdbcType=VARCHAR},</if>
            <if test="module.zhhbic != null">zhhbic = #{module.zhhbic,jdbcType=VARCHAR},</if>
            <if test="module.qiynbz != null">qiynbz = #{module.qiynbz,jdbcType=VARCHAR},</if>
            <if test="module.beiy01 != null">beiy01 = #{module.beiy01,jdbcType=VARCHAR},</if>
            <if test="module.beiy02 != null">beiy02 = #{module.beiy02,jdbcType=VARCHAR},</if>
            <if test="module.beiy03 != null">beiy03 = #{module.beiy03,jdbcType=VARCHAR},</if>
            <if test="module.xinx01 != null">xinx01 = #{module.xinx01,jdbcType=VARCHAR},</if>
            <if test="module.xinx02 != null">xinx02 = #{module.xinx02,jdbcType=VARCHAR},</if>
            <if test="module.xinx03 != null">xinx03 = #{module.xinx03,jdbcType=VARCHAR},</if>
            <if test="module.shjnch != null">shjnch = #{module.shjnch,jdbcType=NUMERIC},</if>
            <if test="module.jiluzt != null">jiluzt = #{module.jiluzt,jdbcType=VARCHAR},</if>
        </set>
        ${conditions}
    </update>

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

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

</mapper>