JudicialCasesDataMapper.xml 11.8 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.judicialCasesData.mapper.JudicialCasesDataMapper">
    
    <resultMap type="JudicialCasesData" id="JudicialCasesDataResult">
        <result property="id"    column="id"    />
        <result property="ename"    column="ename"    />
        <result property="type"    column="type"    />
        <result property="cAh"    column="cAh"    />
        <result property="nJbfy"    column="nJbfy"    />
        <result property="nAjjzjd"    column="nAjjzjd"    />
        <result property="nSlcx"    column="nSlcx"    />
        <result property="dLarq"    column="dLarq"    />
        <result property="nLaay"    column="nLaay"    />
        <result property="dJarq"    column="dJarq"    />
        <result property="nJabdje"    column="nJabdje"    />
        <result property="nJafs"    column="nJafs"    />
        <result property="nPjVictory"    column="nPjVictory"    />
        <result property="nSsdw"    column="nSsdw"    />
        <result property="nQsbdje"    column="nQsbdje"    />
        <result property="nJabdjeGj"    column="nJabdjeGj"    />
        <result property="nPcpcje"    column="nPcpcje"    />
        <result property="nPcpcjeGj"    column="nPcpcjeGj"    />
        <result property="nBqqpcje"    column="nBqqpcje"    />
        <result property="tdName"    column="tdName"    />
        <result property="showAmount"    column="showAmount"    />
        <result property="cGkwsPjjg"    column="cGkwsPjjg"    />
        <result property="lsPjjg"    column="lsPjjg"    />
        <result property="jsondata"    column="jsondata"    />
        <result property="reportId"    column="report_id"    />
        <result property="dataStatus"    column="dataStatus"    />
        <result property="lastUpdateTime"    column="lastUpdateTime"    />
        <result property="cgId"    column="cg_id"    />
    </resultMap>
	
	<sql id="selectJudicialCasesDataVo">
        select id, ename, type, cAh, nJbfy, nAjjzjd, nSlcx, dLarq, nLaay, dJarq, nJabdje, nJafs, nPjVictory, nSsdw, nQsbdje, nJabdjeGj, nPcpcje, nPcpcjeGj, nBqqpcje, tdName, showAmount, cGkwsPjjg, lsPjjg, jsondata, report_id, dataStatus, lastUpdateTime, cg_id from judicial_cases_data
    </sql>
	
    <select id="selectJudicialCasesDataList" parameterType="JudicialCasesData" resultMap="JudicialCasesDataResult">
        <include refid="selectJudicialCasesDataVo"/>
        <where>  
            <if test="id != null "> and id = #{id}</if>
            <if test="ename != null  and ename != '' "> and ename = #{ename}</if>
            <if test="type != null  and type != '' "> and type = #{type}</if>
            <if test="cAh != null  and cAh != '' "> and cAh = #{cAh}</if>
            <if test="nJbfy != null  and nJbfy != '' "> and nJbfy = #{nJbfy}</if>
            <if test="nAjjzjd != null  and nAjjzjd != '' "> and nAjjzjd = #{nAjjzjd}</if>
            <if test="nSlcx != null  and nSlcx != '' "> and nSlcx = #{nSlcx}</if>
            <if test="dLarq != null "> and dLarq = #{dLarq}</if>
            <if test="nLaay != null  and nLaay != '' "> and nLaay = #{nLaay}</if>
            <if test="dJarq != null  and dJarq != '' "> and dJarq = #{dJarq}</if>
            <if test="nJabdje != null  and nJabdje != '' "> and nJabdje = #{nJabdje}</if>
            <if test="nJafs != null  and nJafs != '' "> and nJafs = #{nJafs}</if>
            <if test="nPjVictory != null  and nPjVictory != '' "> and nPjVictory = #{nPjVictory}</if>
            <if test="nSsdw != null  and nSsdw != '' "> and nSsdw = #{nSsdw}</if>
            <if test="nQsbdje != null  and nQsbdje != '' "> and nQsbdje = #{nQsbdje}</if>
            <if test="nJabdjeGj != null  and nJabdjeGj != '' "> and nJabdjeGj = #{nJabdjeGj}</if>
            <if test="nPcpcje != null  and nPcpcje != '' "> and nPcpcje = #{nPcpcje}</if>
            <if test="nPcpcjeGj != null  and nPcpcjeGj != '' "> and nPcpcjeGj = #{nPcpcjeGj}</if>
            <if test="nBqqpcje != null  and nBqqpcje != '' "> and nBqqpcje = #{nBqqpcje}</if>
            <if test="tdName != null  and tdName != '' "> and tdName = #{tdName}</if>
            <if test="showAmount != null  and showAmount != '' "> and showAmount = #{showAmount}</if>
            <if test="cGkwsPjjg != null  and cGkwsPjjg != '' "> and cGkwsPjjg = #{cGkwsPjjg}</if>
            <if test="lsPjjg != null  and lsPjjg != '' "> and lsPjjg = #{lsPjjg}</if>
            <if test="jsondata != null  and jsondata != '' "> and jsondata = #{jsondata}</if>
            <if test="reportId != null  and reportId != '' "> and report_id = #{reportId}</if>
            <if test="dataStatus != null "> and dataStatus = #{dataStatus}</if>
            <if test="lastUpdateTime != null "> and lastUpdateTime = #{lastUpdateTime}</if>
            <if test="cgId != null "> and cg_id = #{cgId}</if>
        </where>
    </select>

    <select id="selectTen" parameterType="JudicialCasesData" resultMap="JudicialCasesDataResult">
        <include refid="selectJudicialCasesDataVo"/>
        where cg_id = #{cgId} and type = #{type} and dataStatus = '1' limit 10
    </select>
    
    <select id="selectJudicialCasesDataById" parameterType="Integer" resultMap="JudicialCasesDataResult">
        <include refid="selectJudicialCasesDataVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertJudicialCasesData" parameterType="JudicialCasesData" useGeneratedKeys="true" keyProperty="id">
        insert into judicial_cases_data
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="ename != null  and ename != ''  ">ename,</if>
			<if test="type != null  and type != ''  ">type,</if>
			<if test="cAh != null  and cAh != ''  ">cAh,</if>
			<if test="nJbfy != null  and nJbfy != ''  ">nJbfy,</if>
			<if test="nAjjzjd != null  and nAjjzjd != ''  ">nAjjzjd,</if>
			<if test="nSlcx != null  and nSlcx != ''  ">nSlcx,</if>
			<if test="dLarq != null  ">dLarq,</if>
			<if test="nLaay != null  and nLaay != ''  ">nLaay,</if>
			<if test="dJarq != null  and dJarq != ''  ">dJarq,</if>
			<if test="nJabdje != null  and nJabdje != ''  ">nJabdje,</if>
			<if test="nJafs != null  and nJafs != ''  ">nJafs,</if>
			<if test="nPjVictory != null  and nPjVictory != ''  ">nPjVictory,</if>
			<if test="nSsdw != null  and nSsdw != ''  ">nSsdw,</if>
			<if test="nQsbdje != null  and nQsbdje != ''  ">nQsbdje,</if>
			<if test="nJabdjeGj != null  and nJabdjeGj != ''  ">nJabdjeGj,</if>
			<if test="nPcpcje != null  and nPcpcje != ''  ">nPcpcje,</if>
			<if test="nPcpcjeGj != null  and nPcpcjeGj != ''  ">nPcpcjeGj,</if>
			<if test="nBqqpcje != null  and nBqqpcje != ''  ">nBqqpcje,</if>
			<if test="tdName != null  and tdName != ''  ">tdName,</if>
			<if test="showAmount != null  and showAmount != ''  ">showAmount,</if>
			<if test="cGkwsPjjg != null  and cGkwsPjjg != ''  ">cGkwsPjjg,</if>
			<if test="lsPjjg != null  and lsPjjg != ''  ">lsPjjg,</if>
			<if test="jsondata != null  and jsondata != ''  ">jsondata,</if>
			<if test="reportId != null  and reportId != ''  ">report_id,</if>
			<if test="dataStatus != null  ">dataStatus,</if>
			<if test="lastUpdateTime != null  ">lastUpdateTime,</if>
			<if test="cgId != null  ">cg_id,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
			<if test="ename != null  and ename != ''  ">#{ename},</if>
			<if test="type != null  and type != ''  ">#{type},</if>
			<if test="cAh != null  and cAh != ''  ">#{cAh},</if>
			<if test="nJbfy != null  and nJbfy != ''  ">#{nJbfy},</if>
			<if test="nAjjzjd != null  and nAjjzjd != ''  ">#{nAjjzjd},</if>
			<if test="nSlcx != null  and nSlcx != ''  ">#{nSlcx},</if>
			<if test="dLarq != null  ">#{dLarq},</if>
			<if test="nLaay != null  and nLaay != ''  ">#{nLaay},</if>
			<if test="dJarq != null  and dJarq != ''  ">#{dJarq},</if>
			<if test="nJabdje != null  and nJabdje != ''  ">#{nJabdje},</if>
			<if test="nJafs != null  and nJafs != ''  ">#{nJafs},</if>
			<if test="nPjVictory != null  and nPjVictory != ''  ">#{nPjVictory},</if>
			<if test="nSsdw != null  and nSsdw != ''  ">#{nSsdw},</if>
			<if test="nQsbdje != null  and nQsbdje != ''  ">#{nQsbdje},</if>
			<if test="nJabdjeGj != null  and nJabdjeGj != ''  ">#{nJabdjeGj},</if>
			<if test="nPcpcje != null  and nPcpcje != ''  ">#{nPcpcje},</if>
			<if test="nPcpcjeGj != null  and nPcpcjeGj != ''  ">#{nPcpcjeGj},</if>
			<if test="nBqqpcje != null  and nBqqpcje != ''  ">#{nBqqpcje},</if>
			<if test="tdName != null  and tdName != ''  ">#{tdName},</if>
			<if test="showAmount != null  and showAmount != ''  ">#{showAmount},</if>
			<if test="cGkwsPjjg != null  and cGkwsPjjg != ''  ">#{cGkwsPjjg},</if>
			<if test="lsPjjg != null  and lsPjjg != ''  ">#{lsPjjg},</if>
			<if test="jsondata != null  and jsondata != ''  ">#{jsondata},</if>
			<if test="reportId != null  and reportId != ''  ">#{reportId},</if>
			<if test="dataStatus != null  ">#{dataStatus},</if>
			<if test="lastUpdateTime != null  ">#{lastUpdateTime},</if>
			<if test="cgId != null  ">#{cgId},</if>
         </trim>
    </insert>
	 
    <update id="updateJudicialCasesData" parameterType="JudicialCasesData">
        update judicial_cases_data
        <trim prefix="SET" suffixOverrides=",">
            <if test="ename != null  and ename != ''  ">ename = #{ename},</if>
            <if test="type != null  and type != ''  ">type = #{type},</if>
            <if test="cAh != null  and cAh != ''  ">cAh = #{cAh},</if>
            <if test="nJbfy != null  and nJbfy != ''  ">nJbfy = #{nJbfy},</if>
            <if test="nAjjzjd != null  and nAjjzjd != ''  ">nAjjzjd = #{nAjjzjd},</if>
            <if test="nSlcx != null  and nSlcx != ''  ">nSlcx = #{nSlcx},</if>
            <if test="dLarq != null  ">dLarq = #{dLarq},</if>
            <if test="nLaay != null  and nLaay != ''  ">nLaay = #{nLaay},</if>
            <if test="dJarq != null  and dJarq != ''  ">dJarq = #{dJarq},</if>
            <if test="nJabdje != null  and nJabdje != ''  ">nJabdje = #{nJabdje},</if>
            <if test="nJafs != null  and nJafs != ''  ">nJafs = #{nJafs},</if>
            <if test="nPjVictory != null  and nPjVictory != ''  ">nPjVictory = #{nPjVictory},</if>
            <if test="nSsdw != null  and nSsdw != ''  ">nSsdw = #{nSsdw},</if>
            <if test="nQsbdje != null  and nQsbdje != ''  ">nQsbdje = #{nQsbdje},</if>
            <if test="nJabdjeGj != null  and nJabdjeGj != ''  ">nJabdjeGj = #{nJabdjeGj},</if>
            <if test="nPcpcje != null  and nPcpcje != ''  ">nPcpcje = #{nPcpcje},</if>
            <if test="nPcpcjeGj != null  and nPcpcjeGj != ''  ">nPcpcjeGj = #{nPcpcjeGj},</if>
            <if test="nBqqpcje != null  and nBqqpcje != ''  ">nBqqpcje = #{nBqqpcje},</if>
            <if test="tdName != null  and tdName != ''  ">tdName = #{tdName},</if>
            <if test="showAmount != null  and showAmount != ''  ">showAmount = #{showAmount},</if>
            <if test="cGkwsPjjg != null  and cGkwsPjjg != ''  ">cGkwsPjjg = #{cGkwsPjjg},</if>
            <if test="lsPjjg != null  and lsPjjg != ''  ">lsPjjg = #{lsPjjg},</if>
            <if test="jsondata != null  and jsondata != ''  ">jsondata = #{jsondata},</if>
            <if test="reportId != null  and reportId != ''  ">report_id = #{reportId},</if>
            <if test="dataStatus != null  ">dataStatus = #{dataStatus},</if>
            <if test="lastUpdateTime != null  ">lastUpdateTime = #{lastUpdateTime},</if>
            <if test="cgId != null  ">cg_id = #{cgId},</if>
        </trim>
        where id = #{id}
    </update>

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