ApiZhZcfzbxxListMapper.xml 7.48 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.lhcredit.project.business.apiZhZcfzbxxList.mapper.ApiZhZcfzbxxListMapper">
    
    <resultMap type="ApiZhZcfzbxxList" id="ApiZhZcfzbxxListResult">
        <result property="id"    column="id"    />
        <result property="authCode"    column="auth_code"    />
        <result property="djxh"    column="djxh"    />
        <result property="nsrsbh"    column="nsrsbh"    />
        <result property="sbrq"    column="sbrq"    />
        <result property="ssqq"    column="ssqq"    />
        <result property="ssqz"    column="ssqz"    />
        <result property="cwbblxDm"    column="cwbblxDm"    />
        <result property="zlbsxlmc"    column="zlbsxlmc"    />
        <result property="mc"    column="mc"    />
        <result property="zcxmmc"    column="zcxmmc"    />
        <result property="qmyeZc"    column="qmyeZc"    />
        <result property="ncyeZc"    column="ncyeZc"    />
        <result property="qyxmmc"    column="qyxmmc"    />
        <result property="qmyeQy"    column="qmyeQy"    />
        <result property="ncyeQy"    column="ncyeQy"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
	
	<sql id="selectApiZhZcfzbxxListVo">
        select id, auth_code, djxh, nsrsbh, sbrq, ssqq, ssqz, cwbblxDm, zlbsxlmc, mc, zcxmmc, qmyeZc, ncyeZc, qyxmmc, qmyeQy, ncyeQy, create_time, update_time from api_zh_zcfzbxx_list
    </sql>
	
    <select id="selectApiZhZcfzbxxListList" parameterType="ApiZhZcfzbxxList" resultMap="ApiZhZcfzbxxListResult">
        <include refid="selectApiZhZcfzbxxListVo"/>
        <where>  
            <if test="id != null "> and id = #{id}</if>
            <if test="authCode != null  and authCode != '' "> and auth_code = #{authCode}</if>
            <if test="djxh != null  and djxh != '' "> and djxh = #{djxh}</if>
            <if test="nsrsbh != null  and nsrsbh != '' "> and nsrsbh = #{nsrsbh}</if>
            <if test="sbrq != null  and sbrq != '' "> and sbrq = #{sbrq}</if>
            <if test="ssqq != null  and ssqq != '' "> and ssqq = #{ssqq}</if>
            <if test="ssqz != null  and ssqz != '' "> and ssqz = #{ssqz}</if>
            <if test="cwbblxDm != null  and cwbblxDm != '' "> and cwbblxDm = #{cwbblxDm}</if>
            <if test="zlbsxlmc != null  and zlbsxlmc != '' "> and zlbsxlmc = #{zlbsxlmc}</if>
            <if test="mc != null  and mc != '' "> and mc = #{mc}</if>
            <if test="zcxmmc != null  and zcxmmc != '' "> and zcxmmc = #{zcxmmc}</if>
            <if test="qmyeZc != null "> and qmyeZc = #{qmyeZc}</if>
            <if test="ncyeZc != null "> and ncyeZc = #{ncyeZc}</if>
            <if test="qyxmmc != null  and qyxmmc != '' "> and qyxmmc = #{qyxmmc}</if>
            <if test="qmyeQy != null "> and qmyeQy = #{qmyeQy}</if>
            <if test="ncyeQy != null "> and ncyeQy = #{ncyeQy}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
        </where>
    </select>
    
    <select id="selectApiZhZcfzbxxListById" parameterType="Integer" resultMap="ApiZhZcfzbxxListResult">
        <include refid="selectApiZhZcfzbxxListVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertApiZhZcfzbxxList" parameterType="ApiZhZcfzbxxList" useGeneratedKeys="true" keyProperty="id">
        insert into api_zh_zcfzbxx_list
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="authCode != null  and authCode != ''  ">auth_code,</if>
			<if test="djxh != null  and djxh != ''  ">djxh,</if>
			<if test="nsrsbh != null  and nsrsbh != ''  ">nsrsbh,</if>
			<if test="sbrq != null  and sbrq != ''  ">sbrq,</if>
			<if test="ssqq != null  and ssqq != ''  ">ssqq,</if>
			<if test="ssqz != null  and ssqz != ''  ">ssqz,</if>
			<if test="cwbblxDm != null  and cwbblxDm != ''  ">cwbblxDm,</if>
			<if test="zlbsxlmc != null  and zlbsxlmc != ''  ">zlbsxlmc,</if>
			<if test="mc != null  and mc != ''  ">mc,</if>
			<if test="zcxmmc != null  and zcxmmc != ''  ">zcxmmc,</if>
			<if test="qmyeZc != null  ">qmyeZc,</if>
			<if test="ncyeZc != null  ">ncyeZc,</if>
			<if test="qyxmmc != null  and qyxmmc != ''  ">qyxmmc,</if>
			<if test="qmyeQy != null  ">qmyeQy,</if>
			<if test="ncyeQy != null  ">ncyeQy,</if>
			<if test="createTime != null  ">create_time,</if>
			<if test="updateTime != null  ">update_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
			<if test="authCode != null  and authCode != ''  ">#{authCode},</if>
			<if test="djxh != null  and djxh != ''  ">#{djxh},</if>
			<if test="nsrsbh != null  and nsrsbh != ''  ">#{nsrsbh},</if>
			<if test="sbrq != null  and sbrq != ''  ">#{sbrq},</if>
			<if test="ssqq != null  and ssqq != ''  ">#{ssqq},</if>
			<if test="ssqz != null  and ssqz != ''  ">#{ssqz},</if>
			<if test="cwbblxDm != null  and cwbblxDm != ''  ">#{cwbblxDm},</if>
			<if test="zlbsxlmc != null  and zlbsxlmc != ''  ">#{zlbsxlmc},</if>
			<if test="mc != null  and mc != ''  ">#{mc},</if>
			<if test="zcxmmc != null  and zcxmmc != ''  ">#{zcxmmc},</if>
			<if test="qmyeZc != null  ">#{qmyeZc},</if>
			<if test="ncyeZc != null  ">#{ncyeZc},</if>
			<if test="qyxmmc != null  and qyxmmc != ''  ">#{qyxmmc},</if>
			<if test="qmyeQy != null  ">#{qmyeQy},</if>
			<if test="ncyeQy != null  ">#{ncyeQy},</if>
			<if test="createTime != null  ">#{createTime},</if>
			<if test="updateTime != null  ">#{updateTime},</if>
         </trim>
    </insert>
	 
    <update id="updateApiZhZcfzbxxList" parameterType="ApiZhZcfzbxxList">
        update api_zh_zcfzbxx_list
        <trim prefix="SET" suffixOverrides=",">
            <if test="authCode != null  and authCode != ''  ">auth_code = #{authCode},</if>
            <if test="djxh != null  and djxh != ''  ">djxh = #{djxh},</if>
            <if test="nsrsbh != null  and nsrsbh != ''  ">nsrsbh = #{nsrsbh},</if>
            <if test="sbrq != null  and sbrq != ''  ">sbrq = #{sbrq},</if>
            <if test="ssqq != null  and ssqq != ''  ">ssqq = #{ssqq},</if>
            <if test="ssqz != null  and ssqz != ''  ">ssqz = #{ssqz},</if>
            <if test="cwbblxDm != null  and cwbblxDm != ''  ">cwbblxDm = #{cwbblxDm},</if>
            <if test="zlbsxlmc != null  and zlbsxlmc != ''  ">zlbsxlmc = #{zlbsxlmc},</if>
            <if test="mc != null  and mc != ''  ">mc = #{mc},</if>
            <if test="zcxmmc != null  and zcxmmc != ''  ">zcxmmc = #{zcxmmc},</if>
            <if test="qmyeZc != null  ">qmyeZc = #{qmyeZc},</if>
            <if test="ncyeZc != null  ">ncyeZc = #{ncyeZc},</if>
            <if test="qyxmmc != null  and qyxmmc != ''  ">qyxmmc = #{qyxmmc},</if>
            <if test="qmyeQy != null  ">qmyeQy = #{qmyeQy},</if>
            <if test="ncyeQy != null  ">ncyeQy = #{ncyeQy},</if>
            <if test="createTime != null  ">create_time = #{createTime},</if>
            <if test="updateTime != null  ">update_time = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>

	<delete id="deleteApiZhZcfzbxxListById" parameterType="Integer">
        delete from api_zh_zcfzbxx_list where id = #{id}
    </delete>
	
    <delete id="deleteApiZhZcfzbxxListByIds" parameterType="String">
        delete from api_zh_zcfzbxx_list where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    
</mapper>