ApiZhZsxxListMapper.xml 7.4 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.apiZhZsxxList.mapper.ApiZhZsxxListMapper">
    
    <resultMap type="ApiZhZsxxList" id="ApiZhZsxxListResult">
        <result property="id"    column="id"    />
        <result property="authCode"    column="auth_code"    />
        <result property="djxh"    column="djxh"    />
        <result property="nsrsbh"    column="nsrsbh"    />
        <result property="jsyj"    column="jsyj"    />
        <result property="skssqq"    column="skssqq"    />
        <result property="skssqz"    column="skssqz"    />
        <result property="jkqx"    column="jkqx"    />
        <result property="yzpzxh"    column="yzpzxh"    />
        <result property="skzlmc"    column="skzlmc"    />
        <result property="sl1"    column="sl1"    />
        <result property="skzt"    column="skzt"    />
        <result property="ybtse"    column="ybtse"    />
        <result property="yzfsrq"    column="yzfsrq"    />
        <result property="zsxmmc"    column="zsxmmc"    />
        <result property="rkrq"    column="rkrq"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
	
	<sql id="selectApiZhZsxxListVo">
        select id, auth_code, djxh, nsrsbh, jsyj, skssqq, skssqz, jkqx, yzpzxh, skzlmc, sl1, skzt, ybtse, yzfsrq, zsxmmc, rkrq, create_time, update_time from api_zh_zsxx_list
    </sql>
	
    <select id="selectApiZhZsxxListList" parameterType="ApiZhZsxxList" resultMap="ApiZhZsxxListResult">
        <include refid="selectApiZhZsxxListVo"/>
        <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="jsyj != null "> and jsyj = #{jsyj}</if>
            <if test="skssqq != null  and skssqq != '' "> and skssqq = #{skssqq}</if>
            <if test="skssqz != null  and skssqz != '' "> and skssqz = #{skssqz}</if>
            <if test="jkqx != null  and jkqx != '' "> and jkqx = #{jkqx}</if>
            <if test="yzpzxh != null  and yzpzxh != '' "> and yzpzxh = #{yzpzxh}</if>
            <if test="skzlmc != null  and skzlmc != '' "> and skzlmc = #{skzlmc}</if>
            <if test="sl1 != null "> and sl1 = #{sl1}</if>
            <if test="skzt != null  and skzt != '' "> and skzt = #{skzt}</if>
            <if test="ybtse != null "> and ybtse = #{ybtse}</if>
            <if test="yzfsrq != null  and yzfsrq != '' "> and yzfsrq = #{yzfsrq}</if>
            <if test="zsxmmc != null  and zsxmmc != '' "> and zsxmmc = #{zsxmmc}</if>
            <if test="rkrq != null  and rkrq != '' "> and rkrq = #{rkrq}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
        </where>
    </select>
    
    <select id="selectApiZhZsxxListById" parameterType="Integer" resultMap="ApiZhZsxxListResult">
        <include refid="selectApiZhZsxxListVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertApiZhZsxxList" parameterType="ApiZhZsxxList" useGeneratedKeys="true" keyProperty="id">
        insert into api_zh_zsxx_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="jsyj != null  ">jsyj,</if>
			<if test="skssqq != null  and skssqq != ''  ">skssqq,</if>
			<if test="skssqz != null  and skssqz != ''  ">skssqz,</if>
			<if test="jkqx != null  and jkqx != ''  ">jkqx,</if>
			<if test="yzpzxh != null  and yzpzxh != ''  ">yzpzxh,</if>
			<if test="skzlmc != null  and skzlmc != ''  ">skzlmc,</if>
			<if test="sl1 != null  ">sl1,</if>
			<if test="skzt != null  and skzt != ''  ">skzt,</if>
			<if test="ybtse != null  ">ybtse,</if>
			<if test="yzfsrq != null  and yzfsrq != ''  ">yzfsrq,</if>
			<if test="zsxmmc != null  and zsxmmc != ''  ">zsxmmc,</if>
			<if test="rkrq != null  and rkrq != ''  ">rkrq,</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="jsyj != null  ">#{jsyj},</if>
			<if test="skssqq != null  and skssqq != ''  ">#{skssqq},</if>
			<if test="skssqz != null  and skssqz != ''  ">#{skssqz},</if>
			<if test="jkqx != null  and jkqx != ''  ">#{jkqx},</if>
			<if test="yzpzxh != null  and yzpzxh != ''  ">#{yzpzxh},</if>
			<if test="skzlmc != null  and skzlmc != ''  ">#{skzlmc},</if>
			<if test="sl1 != null  ">#{sl1},</if>
			<if test="skzt != null  and skzt != ''  ">#{skzt},</if>
			<if test="ybtse != null  ">#{ybtse},</if>
			<if test="yzfsrq != null  and yzfsrq != ''  ">#{yzfsrq},</if>
			<if test="zsxmmc != null  and zsxmmc != ''  ">#{zsxmmc},</if>
			<if test="rkrq != null  and rkrq != ''  ">#{rkrq},</if>
			<if test="createTime != null  ">#{createTime},</if>
			<if test="updateTime != null  ">#{updateTime},</if>
         </trim>
    </insert>
	 
    <update id="updateApiZhZsxxList" parameterType="ApiZhZsxxList">
        update api_zh_zsxx_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="jsyj != null  ">jsyj = #{jsyj},</if>
            <if test="skssqq != null  and skssqq != ''  ">skssqq = #{skssqq},</if>
            <if test="skssqz != null  and skssqz != ''  ">skssqz = #{skssqz},</if>
            <if test="jkqx != null  and jkqx != ''  ">jkqx = #{jkqx},</if>
            <if test="yzpzxh != null  and yzpzxh != ''  ">yzpzxh = #{yzpzxh},</if>
            <if test="skzlmc != null  and skzlmc != ''  ">skzlmc = #{skzlmc},</if>
            <if test="sl1 != null  ">sl1 = #{sl1},</if>
            <if test="skzt != null  and skzt != ''  ">skzt = #{skzt},</if>
            <if test="ybtse != null  ">ybtse = #{ybtse},</if>
            <if test="yzfsrq != null  and yzfsrq != ''  ">yzfsrq = #{yzfsrq},</if>
            <if test="zsxmmc != null  and zsxmmc != ''  ">zsxmmc = #{zsxmmc},</if>
            <if test="rkrq != null  and rkrq != ''  ">rkrq = #{rkrq},</if>
            <if test="createTime != null  ">create_time = #{createTime},</if>
            <if test="updateTime != null  ">update_time = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>

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