ApiZhQsggListMapper.xml 5.52 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.apiZhQsggList.mapper.ApiZhQsggListMapper">
    
    <resultMap type="ApiZhQsggList" id="ApiZhQsggListResult">
        <result property="id"    column="id"    />
        <result property="authCode"    column="auth_code"    />
        <result property="nsrsbh"    column="nsrsbh"    />
        <result property="dqxzqsje"    column="dqxzqsje"    />
        <result property="zsxmMc"    column="zsxmMc"    />
        <result property="zspmMc"    column="zspmMc"    />
        <result property="jkqx"    column="jkqx"    />
        <result property="qsye"    column="qsye"    />
        <result property="skssqq"    column="skssqq"    />
        <result property="skssqz"    column="skssqz"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
	
	<sql id="selectApiZhQsggListVo">
        select id, auth_code, nsrsbh, dqxzqsje, zsxmMc, zspmMc, jkqx, qsye, skssqq, skssqz, create_time, update_time from api_zh_qsgg_list
    </sql>
	
    <select id="selectApiZhQsggListList" parameterType="ApiZhQsggList" resultMap="ApiZhQsggListResult">
        <include refid="selectApiZhQsggListVo"/>
        <where>  
            <if test="id != null "> and id = #{id}</if>
            <if test="authCode != null  and authCode != '' "> and auth_code = #{authCode}</if>
            <if test="nsrsbh != null  and nsrsbh != '' "> and nsrsbh = #{nsrsbh}</if>
            <if test="dqxzqsje != null "> and dqxzqsje = #{dqxzqsje}</if>
            <if test="zsxmMc != null  and zsxmMc != '' "> and zsxmMc = #{zsxmMc}</if>
            <if test="zspmMc != null  and zspmMc != '' "> and zspmMc = #{zspmMc}</if>
            <if test="jkqx != null  and jkqx != '' "> and jkqx = #{jkqx}</if>
            <if test="qsye != null "> and qsye = #{qsye}</if>
            <if test="skssqq != null  and skssqq != '' "> and skssqq = #{skssqq}</if>
            <if test="skssqz != null  and skssqz != '' "> and skssqz = #{skssqz}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
        </where>
    </select>
    
    <select id="selectApiZhQsggListById" parameterType="Integer" resultMap="ApiZhQsggListResult">
        <include refid="selectApiZhQsggListVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertApiZhQsggList" parameterType="ApiZhQsggList" useGeneratedKeys="true" keyProperty="id">
        insert into api_zh_qsgg_list
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="authCode != null  and authCode != ''  ">auth_code,</if>
			<if test="nsrsbh != null  and nsrsbh != ''  ">nsrsbh,</if>
			<if test="dqxzqsje != null  ">dqxzqsje,</if>
			<if test="zsxmMc != null  and zsxmMc != ''  ">zsxmMc,</if>
			<if test="zspmMc != null  and zspmMc != ''  ">zspmMc,</if>
			<if test="jkqx != null  and jkqx != ''  ">jkqx,</if>
			<if test="qsye != null  ">qsye,</if>
			<if test="skssqq != null  and skssqq != ''  ">skssqq,</if>
			<if test="skssqz != null  and skssqz != ''  ">skssqz,</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="nsrsbh != null  and nsrsbh != ''  ">#{nsrsbh},</if>
			<if test="dqxzqsje != null  ">#{dqxzqsje},</if>
			<if test="zsxmMc != null  and zsxmMc != ''  ">#{zsxmMc},</if>
			<if test="zspmMc != null  and zspmMc != ''  ">#{zspmMc},</if>
			<if test="jkqx != null  and jkqx != ''  ">#{jkqx},</if>
			<if test="qsye != null  ">#{qsye},</if>
			<if test="skssqq != null  and skssqq != ''  ">#{skssqq},</if>
			<if test="skssqz != null  and skssqz != ''  ">#{skssqz},</if>
			<if test="createTime != null  ">#{createTime},</if>
			<if test="updateTime != null  ">#{updateTime},</if>
         </trim>
    </insert>
	 
    <update id="updateApiZhQsggList" parameterType="ApiZhQsggList">
        update api_zh_qsgg_list
        <trim prefix="SET" suffixOverrides=",">
            <if test="authCode != null  and authCode != ''  ">auth_code = #{authCode},</if>
            <if test="nsrsbh != null  and nsrsbh != ''  ">nsrsbh = #{nsrsbh},</if>
            <if test="dqxzqsje != null  ">dqxzqsje = #{dqxzqsje},</if>
            <if test="zsxmMc != null  and zsxmMc != ''  ">zsxmMc = #{zsxmMc},</if>
            <if test="zspmMc != null  and zspmMc != ''  ">zspmMc = #{zspmMc},</if>
            <if test="jkqx != null  and jkqx != ''  ">jkqx = #{jkqx},</if>
            <if test="qsye != null  ">qsye = #{qsye},</if>
            <if test="skssqq != null  and skssqq != ''  ">skssqq = #{skssqq},</if>
            <if test="skssqz != null  and skssqz != ''  ">skssqz = #{skssqz},</if>
            <if test="createTime != null  ">create_time = #{createTime},</if>
            <if test="updateTime != null  ">update_time = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>

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