ApiZhSpxsxxListMapper.xml 7.43 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.apiZhSpxsxxList.mapper.ApiZhSpxsxxListMapper">
    
    <resultMap type="ApiZhSpxsxxList" id="ApiZhSpxsxxListResult">
        <result property="id"    column="id"    />
        <result property="authCode"    column="auth_code"    />
        <result property="djxh"    column="djxh"    />
        <result property="nsrsbh"    column="nsrsbh"    />
        <result property="hwbmCount"    column="hwbmCount"    />
        <result property="jeSum"    column="jeSum"    />
        <result property="jeSumRank"    column="jeSumRank"    />
        <result property="kpyf"    column="kpyf"    />
        <result property="seSum"    column="seSum"    />
        <result property="slSum"    column="slSum"    />
        <result property="slv"    column="slv"    />
        <result property="spbm"    column="spbm"    />
        <result property="zcjeCntRate"    column="zcjeCntRate"    />
        <result property="zcjeSumRate"    column="zcjeSumRate"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="spmc"    column="spmc"    />
        <result property="xfnsrdzdah"    column="xfnsrdzdah"    />
    </resultMap>
	
	<sql id="selectApiZhSpxsxxListVo">
        select id, auth_code, djxh, nsrsbh, hwbmCount, jeSum, jeSumRank, kpyf, seSum, slSum, slv, spbm, zcjeCntRate, zcjeSumRate, create_time, update_time, spmc, xfnsrdzdah from api_zh_spxsxx_list
    </sql>
	
    <select id="selectApiZhSpxsxxListList" parameterType="ApiZhSpxsxxList" resultMap="ApiZhSpxsxxListResult">
        <include refid="selectApiZhSpxsxxListVo"/>
        <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="hwbmCount != null "> and hwbmCount = #{hwbmCount}</if>
            <if test="jeSum != null "> and jeSum = #{jeSum}</if>
            <if test="jeSumRank != null "> and jeSumRank = #{jeSumRank}</if>
            <if test="kpyf != null  and kpyf != '' "> and kpyf = #{kpyf}</if>
            <if test="seSum != null "> and seSum = #{seSum}</if>
            <if test="slSum != null "> and slSum = #{slSum}</if>
            <if test="slv != null  and slv != '' "> and slv = #{slv}</if>
            <if test="spbm != null  and spbm != '' "> and spbm = #{spbm}</if>
            <if test="zcjeCntRate != null "> and zcjeCntRate = #{zcjeCntRate}</if>
            <if test="zcjeSumRate != null "> and zcjeSumRate = #{zcjeSumRate}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
            <if test="spmc != null  and spmc != '' "> and spmc = #{spmc}</if>
            <if test="xfnsrdzdah != null  and xfnsrdzdah != '' "> and xfnsrdzdah = #{xfnsrdzdah}</if>
        </where>
    </select>
    
    <select id="selectApiZhSpxsxxListById" parameterType="Integer" resultMap="ApiZhSpxsxxListResult">
        <include refid="selectApiZhSpxsxxListVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertApiZhSpxsxxList" parameterType="ApiZhSpxsxxList" useGeneratedKeys="true" keyProperty="id">
        insert into api_zh_spxsxx_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="hwbmCount != null  ">hwbmCount,</if>
			<if test="jeSum != null  ">jeSum,</if>
			<if test="jeSumRank != null  ">jeSumRank,</if>
			<if test="kpyf != null  and kpyf != ''  ">kpyf,</if>
			<if test="seSum != null  ">seSum,</if>
			<if test="slSum != null  ">slSum,</if>
			<if test="slv != null  and slv != ''  ">slv,</if>
			<if test="spbm != null  and spbm != ''  ">spbm,</if>
			<if test="zcjeCntRate != null  ">zcjeCntRate,</if>
			<if test="zcjeSumRate != null  ">zcjeSumRate,</if>
			<if test="createTime != null  ">create_time,</if>
			<if test="updateTime != null  ">update_time,</if>
			<if test="spmc != null  and spmc != ''  ">spmc,</if>
			<if test="xfnsrdzdah != null  and xfnsrdzdah != ''  ">xfnsrdzdah,</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="hwbmCount != null  ">#{hwbmCount},</if>
			<if test="jeSum != null  ">#{jeSum},</if>
			<if test="jeSumRank != null  ">#{jeSumRank},</if>
			<if test="kpyf != null  and kpyf != ''  ">#{kpyf},</if>
			<if test="seSum != null  ">#{seSum},</if>
			<if test="slSum != null  ">#{slSum},</if>
			<if test="slv != null  and slv != ''  ">#{slv},</if>
			<if test="spbm != null  and spbm != ''  ">#{spbm},</if>
			<if test="zcjeCntRate != null  ">#{zcjeCntRate},</if>
			<if test="zcjeSumRate != null  ">#{zcjeSumRate},</if>
			<if test="createTime != null  ">#{createTime},</if>
			<if test="updateTime != null  ">#{updateTime},</if>
			<if test="spmc != null  and spmc != ''  ">#{spmc},</if>
			<if test="xfnsrdzdah != null  and xfnsrdzdah != ''  ">#{xfnsrdzdah},</if>
         </trim>
    </insert>
	 
    <update id="updateApiZhSpxsxxList" parameterType="ApiZhSpxsxxList">
        update api_zh_spxsxx_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="hwbmCount != null  ">hwbmCount = #{hwbmCount},</if>
            <if test="jeSum != null  ">jeSum = #{jeSum},</if>
            <if test="jeSumRank != null  ">jeSumRank = #{jeSumRank},</if>
            <if test="kpyf != null  and kpyf != ''  ">kpyf = #{kpyf},</if>
            <if test="seSum != null  ">seSum = #{seSum},</if>
            <if test="slSum != null  ">slSum = #{slSum},</if>
            <if test="slv != null  and slv != ''  ">slv = #{slv},</if>
            <if test="spbm != null  and spbm != ''  ">spbm = #{spbm},</if>
            <if test="zcjeCntRate != null  ">zcjeCntRate = #{zcjeCntRate},</if>
            <if test="zcjeSumRate != null  ">zcjeSumRate = #{zcjeSumRate},</if>
            <if test="createTime != null  ">create_time = #{createTime},</if>
            <if test="updateTime != null  ">update_time = #{updateTime},</if>
            <if test="spmc != null  and spmc != ''  ">spmc = #{spmc},</if>
            <if test="xfnsrdzdah != null  and xfnsrdzdah != ''  ">xfnsrdzdah = #{xfnsrdzdah},</if>
        </trim>
        where id = #{id}
    </update>

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