ApiZhWfxwListMapper.xml 6.79 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.apiZhWfxwList.mapper.ApiZhWfxwListMapper">
    
    <resultMap type="ApiZhWfxwList" id="ApiZhWfxwListResult">
        <result property="id"    column="id"    />
        <result property="nsrsbh"    column="nsrsbh"    />
        <result property="djrq"    column="djrq"    />
        <result property="lrrq"    column="lrrq"    />
        <result property="sswflxmc"    column="sswflxmc"    />
        <result property="wfxwmc"    column="wfxwmc"    />
        <result property="sswfxwclztmc"    column="sswfxwclztmc"    />
        <result property="sswfsdmc"    column="sswfsdmc"    />
        <result property="ssqjq"    column="ssqjq"    />
        <result property="ssqjz"    column="ssqjz"    />
        <result property="wfss"    column="wfss"    />
        <result property="clcfsj"    column="clcfsj"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="authCode"    column="auth_code"    />
    </resultMap>
	
	<sql id="selectApiZhWfxwListVo">
        select id, nsrsbh, djrq, lrrq, sswflxmc, wfxwmc, sswfxwclztmc, sswfsdmc, ssqjq, ssqjz, wfss, clcfsj, create_time, update_time, auth_code from api_zh_wfxw_list
    </sql>
	
    <select id="selectApiZhWfxwListList" parameterType="ApiZhWfxwList" resultMap="ApiZhWfxwListResult">
        <include refid="selectApiZhWfxwListVo"/>
        <where>  
            <if test="id != null "> and id = #{id}</if>
            <if test="nsrsbh != null  and nsrsbh != '' "> and nsrsbh = #{nsrsbh}</if>
            <if test="djrq != null  and djrq != '' "> and djrq = #{djrq}</if>
            <if test="lrrq != null  and lrrq != '' "> and lrrq = #{lrrq}</if>
            <if test="sswflxmc != null  and sswflxmc != '' "> and sswflxmc = #{sswflxmc}</if>
            <if test="wfxwmc != null  and wfxwmc != '' "> and wfxwmc = #{wfxwmc}</if>
            <if test="sswfxwclztmc != null  and sswfxwclztmc != '' "> and sswfxwclztmc = #{sswfxwclztmc}</if>
            <if test="sswfsdmc != null  and sswfsdmc != '' "> and sswfsdmc = #{sswfsdmc}</if>
            <if test="ssqjq != null  and ssqjq != '' "> and ssqjq = #{ssqjq}</if>
            <if test="ssqjz != null  and ssqjz != '' "> and ssqjz = #{ssqjz}</if>
            <if test="wfss != null  and wfss != '' "> and wfss = #{wfss}</if>
            <if test="clcfsj != null  and clcfsj != '' "> and clcfsj = #{clcfsj}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
            <if test="authCode != null  and authCode != '' "> and auth_code = #{authCode}</if>
        </where>
    </select>
    
    <select id="selectApiZhWfxwListById" parameterType="Integer" resultMap="ApiZhWfxwListResult">
        <include refid="selectApiZhWfxwListVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertApiZhWfxwList" parameterType="ApiZhWfxwList" useGeneratedKeys="true" keyProperty="id">
        insert into api_zh_wfxw_list
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="nsrsbh != null  and nsrsbh != ''  ">nsrsbh,</if>
			<if test="djrq != null  and djrq != ''  ">djrq,</if>
			<if test="lrrq != null  and lrrq != ''  ">lrrq,</if>
			<if test="sswflxmc != null  and sswflxmc != ''  ">sswflxmc,</if>
			<if test="wfxwmc != null  and wfxwmc != ''  ">wfxwmc,</if>
			<if test="sswfxwclztmc != null  and sswfxwclztmc != ''  ">sswfxwclztmc,</if>
			<if test="sswfsdmc != null  and sswfsdmc != ''  ">sswfsdmc,</if>
			<if test="ssqjq != null  and ssqjq != ''  ">ssqjq,</if>
			<if test="ssqjz != null  and ssqjz != ''  ">ssqjz,</if>
			<if test="wfss != null  and wfss != ''  ">wfss,</if>
			<if test="clcfsj != null  and clcfsj != ''  ">clcfsj,</if>
			<if test="createTime != null  ">create_time,</if>
			<if test="updateTime != null  ">update_time,</if>
			<if test="authCode != null  and authCode != ''  ">auth_code,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
			<if test="nsrsbh != null  and nsrsbh != ''  ">#{nsrsbh},</if>
			<if test="djrq != null  and djrq != ''  ">#{djrq},</if>
			<if test="lrrq != null  and lrrq != ''  ">#{lrrq},</if>
			<if test="sswflxmc != null  and sswflxmc != ''  ">#{sswflxmc},</if>
			<if test="wfxwmc != null  and wfxwmc != ''  ">#{wfxwmc},</if>
			<if test="sswfxwclztmc != null  and sswfxwclztmc != ''  ">#{sswfxwclztmc},</if>
			<if test="sswfsdmc != null  and sswfsdmc != ''  ">#{sswfsdmc},</if>
			<if test="ssqjq != null  and ssqjq != ''  ">#{ssqjq},</if>
			<if test="ssqjz != null  and ssqjz != ''  ">#{ssqjz},</if>
			<if test="wfss != null  and wfss != ''  ">#{wfss},</if>
			<if test="clcfsj != null  and clcfsj != ''  ">#{clcfsj},</if>
			<if test="createTime != null  ">#{createTime},</if>
			<if test="updateTime != null  ">#{updateTime},</if>
			<if test="authCode != null  and authCode != ''  ">#{authCode},</if>
         </trim>
    </insert>
	 
    <update id="updateApiZhWfxwList" parameterType="ApiZhWfxwList">
        update api_zh_wfxw_list
        <trim prefix="SET" suffixOverrides=",">
            <if test="nsrsbh != null  and nsrsbh != ''  ">nsrsbh = #{nsrsbh},</if>
            <if test="djrq != null  and djrq != ''  ">djrq = #{djrq},</if>
            <if test="lrrq != null  and lrrq != ''  ">lrrq = #{lrrq},</if>
            <if test="sswflxmc != null  and sswflxmc != ''  ">sswflxmc = #{sswflxmc},</if>
            <if test="wfxwmc != null  and wfxwmc != ''  ">wfxwmc = #{wfxwmc},</if>
            <if test="sswfxwclztmc != null  and sswfxwclztmc != ''  ">sswfxwclztmc = #{sswfxwclztmc},</if>
            <if test="sswfsdmc != null  and sswfsdmc != ''  ">sswfsdmc = #{sswfsdmc},</if>
            <if test="ssqjq != null  and ssqjq != ''  ">ssqjq = #{ssqjq},</if>
            <if test="ssqjz != null  and ssqjz != ''  ">ssqjz = #{ssqjz},</if>
            <if test="wfss != null  and wfss != ''  ">wfss = #{wfss},</if>
            <if test="clcfsj != null  and clcfsj != ''  ">clcfsj = #{clcfsj},</if>
            <if test="createTime != null  ">create_time = #{createTime},</if>
            <if test="updateTime != null  ">update_time = #{updateTime},</if>
            <if test="authCode != null  and authCode != ''  ">auth_code = #{authCode},</if>
        </trim>
        where id = #{id}
    </update>

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