ApiZhXykphzxxListMapper.xml 8.73 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.apiZhXykphzxxList.mapper.ApiZhXykphzxxListMapper">
    
    <resultMap type="ApiZhXykphzxxList" id="ApiZhXykphzxxListResult">
        <result property="id"    column="id"    />
        <result property="authCode"    column="auth_code"    />
        <result property="djxh"    column="djxh"    />
        <result property="nsrsbh"    column="nsrsbh"    />
        <result property="gfCount"    column="gfCount"    />
        <result property="gfDjxh"    column="gfDjxh"    />
        <result property="gfhyId"    column="gfhyId"    />
        <result property="gfmc"    column="gfmc"    />
        <result property="kpqj"    column="kpqj"    />
        <result property="kpyf"    column="kpyf"    />
        <result property="zcjeCnt"    column="zcjeCnt"    />
        <result property="zcjeCntRate"    column="zcjeCntRate"    />
        <result property="zcjeSum"    column="zcjeSum"    />
        <result property="zcjeSumRank"    column="zcjeSumRank"    />
        <result property="zcjeSumRate"    column="zcjeSumRate"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="wsjeSum"    column="wsjeSum"    />
        <result property="xfDlhyDm"    column="xfDlhyDm"    />
        <result property="xfDlhymc"    column="xfDlhymc"    />
        <result property="xfnsrdzdah"    column="xfnsrdzdah"    />
    </resultMap>
	
	<sql id="selectApiZhXykphzxxListVo">
        select id, auth_code, djxh, nsrsbh, gfCount, gfDjxh, gfhyId, gfmc, kpqj, kpyf, zcjeCnt, zcjeCntRate, zcjeSum, zcjeSumRank, zcjeSumRate, create_time, update_time, wsjeSum, xfDlhyDm, xfDlhymc, xfnsrdzdah from api_zh_xykphzxx_list
    </sql>
	
    <select id="selectApiZhXykphzxxListList" parameterType="ApiZhXykphzxxList" resultMap="ApiZhXykphzxxListResult">
        <include refid="selectApiZhXykphzxxListVo"/>
        <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="gfCount != null "> and gfCount = #{gfCount}</if>
            <if test="gfDjxh != null  and gfDjxh != '' "> and gfDjxh = #{gfDjxh}</if>
            <if test="gfhyId != null  and gfhyId != '' "> and gfhyId = #{gfhyId}</if>
            <if test="gfmc != null  and gfmc != '' "> and gfmc = #{gfmc}</if>
            <if test="kpqj != null  and kpqj != '' "> and kpqj = #{kpqj}</if>
            <if test="kpyf != null  and kpyf != '' "> and kpyf = #{kpyf}</if>
            <if test="zcjeCnt != null "> and zcjeCnt = #{zcjeCnt}</if>
            <if test="zcjeCntRate != null "> and zcjeCntRate = #{zcjeCntRate}</if>
            <if test="zcjeSum != null "> and zcjeSum = #{zcjeSum}</if>
            <if test="zcjeSumRank != null "> and zcjeSumRank = #{zcjeSumRank}</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="wsjeSum != null "> and wsjeSum = #{wsjeSum}</if>
            <if test="xfDlhyDm != null  and xfDlhyDm != '' "> and xfDlhyDm = #{xfDlhyDm}</if>
            <if test="xfDlhymc != null  and xfDlhymc != '' "> and xfDlhymc = #{xfDlhymc}</if>
            <if test="xfnsrdzdah != null  and xfnsrdzdah != '' "> and xfnsrdzdah = #{xfnsrdzdah}</if>
        </where>
    </select>
    
    <select id="selectApiZhXykphzxxListById" parameterType="Integer" resultMap="ApiZhXykphzxxListResult">
        <include refid="selectApiZhXykphzxxListVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertApiZhXykphzxxList" parameterType="ApiZhXykphzxxList" useGeneratedKeys="true" keyProperty="id">
        insert into api_zh_xykphzxx_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="gfCount != null  ">gfCount,</if>
			<if test="gfDjxh != null  and gfDjxh != ''  ">gfDjxh,</if>
			<if test="gfhyId != null  and gfhyId != ''  ">gfhyId,</if>
			<if test="gfmc != null  and gfmc != ''  ">gfmc,</if>
			<if test="kpqj != null  and kpqj != ''  ">kpqj,</if>
			<if test="kpyf != null  and kpyf != ''  ">kpyf,</if>
			<if test="zcjeCnt != null  ">zcjeCnt,</if>
			<if test="zcjeCntRate != null  ">zcjeCntRate,</if>
			<if test="zcjeSum != null  ">zcjeSum,</if>
			<if test="zcjeSumRank != null  ">zcjeSumRank,</if>
			<if test="zcjeSumRate != null  ">zcjeSumRate,</if>
			<if test="createTime != null  ">create_time,</if>
			<if test="updateTime != null  ">update_time,</if>
			<if test="wsjeSum != null  ">wsjeSum,</if>
			<if test="xfDlhyDm != null  and xfDlhyDm != ''  ">xfDlhyDm,</if>
			<if test="xfDlhymc != null  and xfDlhymc != ''  ">xfDlhymc,</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="gfCount != null  ">#{gfCount},</if>
			<if test="gfDjxh != null  and gfDjxh != ''  ">#{gfDjxh},</if>
			<if test="gfhyId != null  and gfhyId != ''  ">#{gfhyId},</if>
			<if test="gfmc != null  and gfmc != ''  ">#{gfmc},</if>
			<if test="kpqj != null  and kpqj != ''  ">#{kpqj},</if>
			<if test="kpyf != null  and kpyf != ''  ">#{kpyf},</if>
			<if test="zcjeCnt != null  ">#{zcjeCnt},</if>
			<if test="zcjeCntRate != null  ">#{zcjeCntRate},</if>
			<if test="zcjeSum != null  ">#{zcjeSum},</if>
			<if test="zcjeSumRank != null  ">#{zcjeSumRank},</if>
			<if test="zcjeSumRate != null  ">#{zcjeSumRate},</if>
			<if test="createTime != null  ">#{createTime},</if>
			<if test="updateTime != null  ">#{updateTime},</if>
			<if test="wsjeSum != null  ">#{wsjeSum},</if>
			<if test="xfDlhyDm != null  and xfDlhyDm != ''  ">#{xfDlhyDm},</if>
			<if test="xfDlhymc != null  and xfDlhymc != ''  ">#{xfDlhymc},</if>
			<if test="xfnsrdzdah != null  and xfnsrdzdah != ''  ">#{xfnsrdzdah},</if>
         </trim>
    </insert>
	 
    <update id="updateApiZhXykphzxxList" parameterType="ApiZhXykphzxxList">
        update api_zh_xykphzxx_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="gfCount != null  ">gfCount = #{gfCount},</if>
            <if test="gfDjxh != null  and gfDjxh != ''  ">gfDjxh = #{gfDjxh},</if>
            <if test="gfhyId != null  and gfhyId != ''  ">gfhyId = #{gfhyId},</if>
            <if test="gfmc != null  and gfmc != ''  ">gfmc = #{gfmc},</if>
            <if test="kpqj != null  and kpqj != ''  ">kpqj = #{kpqj},</if>
            <if test="kpyf != null  and kpyf != ''  ">kpyf = #{kpyf},</if>
            <if test="zcjeCnt != null  ">zcjeCnt = #{zcjeCnt},</if>
            <if test="zcjeCntRate != null  ">zcjeCntRate = #{zcjeCntRate},</if>
            <if test="zcjeSum != null  ">zcjeSum = #{zcjeSum},</if>
            <if test="zcjeSumRank != null  ">zcjeSumRank = #{zcjeSumRank},</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="wsjeSum != null  ">wsjeSum = #{wsjeSum},</if>
            <if test="xfDlhyDm != null  and xfDlhyDm != ''  ">xfDlhyDm = #{xfDlhyDm},</if>
            <if test="xfDlhymc != null  and xfDlhymc != ''  ">xfDlhymc = #{xfDlhymc},</if>
            <if test="xfnsrdzdah != null  and xfnsrdzdah != ''  ">xfnsrdzdah = #{xfnsrdzdah},</if>
        </trim>
        where id = #{id}
    </update>

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