XzspSgsDataMapper.xml 10.3 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.credit.cy.center.mapper.XzspSgsDataMapper">
    
    <resultMap type="XzspSgsData" id="XzspSgsDataResult">
        <result property="bsTimeTemp"    column="bs_time_temp"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="creditCode"    column="credit_code"    />
        <result property="dataInfo"    column="data_info"    />
        <result property="djzt"    column="djzt"    />
        <result property="id"    column="id"    />
        <result property="isBs"    column="is_bs"    />
        <result property="jdrqTemp"    column="jdrq_temp"    />
        <result property="objectName"    column="object_name"    />
        <result property="publicState"    column="public_state"    />
        <result property="publicTimeTemp"    column="public_time_temp"    />
        <result property="remark"    column="remark"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="xkFrZjhm"    column="xk_fr_zjhm"    />
        <result property="xkFrZjlx"    column="xk_fr_zjlx"    />
        <result property="xkFrdb"    column="xk_frdb"    />
        <result property="xkLydw"    column="xk_lydw"    />
        <result property="xkLydwdm"    column="xk_lydwdm"    />
        <result property="xkNr"    column="xk_nr"    />
        <result property="xkXdrLb"    column="xk_xdr_lb"    />
        <result property="xkXkbh"    column="xk_xkbh"    />
        <result property="xkXkjg"    column="xk_xkjg"    />
        <result property="xkXkjgdm"    column="xk_xkjgdm"    />
        <result property="xkXklb"    column="xk_xklb"    />
        <result property="xkXkws"    column="xk_xkws"    />
        <result property="xkwjbh"    column="xkwjbh"    />
        <result property="yxqTemp"    column="yxq_temp"    />
        <result property="yxqendTemp"    column="yxqend_temp"    />
    </resultMap>
	
	<sql id="selectXzspSgsDataVo">
        select bs_time_temp, create_by, create_time, credit_code, data_info, djzt, id, is_bs, jdrq_temp, object_name, public_state, public_time_temp, remark, update_by, update_time, xk_fr_zjhm, xk_fr_zjlx, xk_frdb, xk_lydw, xk_lydwdm, xk_nr, xk_xdr_lb, xk_xkbh, xk_xkjg, xk_xkjgdm, xk_xklb, xk_xkws, xkwjbh, yxq_temp, yxqend_temp from xzsp_sgs_data
    </sql>
	
    <select id="selectXzspSgsDataList" parameterType="XzspSgsData" resultMap="XzspSgsDataResult">
        <include refid="selectXzspSgsDataVo"/>
        <where>  
            1=1
            <if test="beginTime != null ">  and create_time > #{beginTime}</if>
            <if test="endTime != null ">  and create_time &lt;= #{endTime}</if>

        </where>
    </select>
    
    <select id="selectXzspSgsDataById" parameterType="String" resultMap="XzspSgsDataResult">
        <include refid="selectXzspSgsDataVo"/>
        where bs_time_temp = #{bsTimeTemp}
    </select>


    <insert id="insertXzspSgsData" parameterType="XzspSgsData">
        insert into xzsp_sgs_data
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="bsTimeTemp != null  and bsTimeTemp != ''  ">bs_time_temp,</if>
			<if test="createBy != null  and createBy != ''  ">create_by,</if>
			<if test="createTime != null  ">create_time,</if>
			<if test="creditCode != null  and creditCode != ''  ">credit_code,</if>
			<if test="dataInfo != null  and dataInfo != ''  ">data_info,</if>
			<if test="djzt != null  and djzt != ''  ">djzt,</if>
			<if test="id != null  ">id,</if>
			<if test="isBs != null  and isBs != ''  ">is_bs,</if>
			<if test="jdrqTemp != null  and jdrqTemp != ''  ">jdrq_temp,</if>
			<if test="objectName != null  and objectName != ''  ">object_name,</if>
			<if test="publicState != null  and publicState != ''  ">public_state,</if>
			<if test="publicTimeTemp != null  ">public_time_temp,</if>
			<if test="remark != null  and remark != ''  ">remark,</if>
			<if test="updateBy != null  and updateBy != ''  ">update_by,</if>
			<if test="updateTime != null  ">update_time,</if>
			<if test="xkFrZjhm != null  and xkFrZjhm != ''  ">xk_fr_zjhm,</if>
			<if test="xkFrZjlx != null  and xkFrZjlx != ''  ">xk_fr_zjlx,</if>
			<if test="xkFrdb != null  and xkFrdb != ''  ">xk_frdb,</if>
			<if test="xkLydw != null  and xkLydw != ''  ">xk_lydw,</if>
			<if test="xkLydwdm != null  and xkLydwdm != ''  ">xk_lydwdm,</if>
			<if test="xkNr != null  and xkNr != ''  ">xk_nr,</if>
			<if test="xkXdrLb != null  and xkXdrLb != ''  ">xk_xdr_lb,</if>
			<if test="xkXkbh != null  and xkXkbh != ''  ">xk_xkbh,</if>
			<if test="xkXkjg != null  and xkXkjg != ''  ">xk_xkjg,</if>
			<if test="xkXkjgdm != null  and xkXkjgdm != ''  ">xk_xkjgdm,</if>
			<if test="xkXklb != null  and xkXklb != ''  ">xk_xklb,</if>
			<if test="xkXkws != null  and xkXkws != ''  ">xk_xkws,</if>
			<if test="xkwjbh != null  and xkwjbh != ''  ">xkwjbh,</if>
			<if test="yxqTemp != null  and yxqTemp != ''  ">yxq_temp,</if>
			<if test="yxqendTemp != null  and yxqendTemp != ''  ">yxqend_temp,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
			<if test="bsTimeTemp != null  and bsTimeTemp != ''  ">#{bsTimeTemp},</if>
			<if test="createBy != null  and createBy != ''  ">#{createBy},</if>
			<if test="createTime != null  ">#{createTime},</if>
			<if test="creditCode != null  and creditCode != ''  ">#{creditCode},</if>
			<if test="dataInfo != null  and dataInfo != ''  ">#{dataInfo},</if>
			<if test="djzt != null  and djzt != ''  ">#{djzt},</if>
			<if test="id != null  ">#{id},</if>
			<if test="isBs != null  and isBs != ''  ">#{isBs},</if>
			<if test="jdrqTemp != null  and jdrqTemp != ''  ">#{jdrqTemp},</if>
			<if test="objectName != null  and objectName != ''  ">#{objectName},</if>
			<if test="publicState != null  and publicState != ''  ">#{publicState},</if>
			<if test="publicTimeTemp != null  ">#{publicTimeTemp},</if>
			<if test="remark != null  and remark != ''  ">#{remark},</if>
			<if test="updateBy != null  and updateBy != ''  ">#{updateBy},</if>
			<if test="updateTime != null  ">#{updateTime},</if>
			<if test="xkFrZjhm != null  and xkFrZjhm != ''  ">#{xkFrZjhm},</if>
			<if test="xkFrZjlx != null  and xkFrZjlx != ''  ">#{xkFrZjlx},</if>
			<if test="xkFrdb != null  and xkFrdb != ''  ">#{xkFrdb},</if>
			<if test="xkLydw != null  and xkLydw != ''  ">#{xkLydw},</if>
			<if test="xkLydwdm != null  and xkLydwdm != ''  ">#{xkLydwdm},</if>
			<if test="xkNr != null  and xkNr != ''  ">#{xkNr},</if>
			<if test="xkXdrLb != null  and xkXdrLb != ''  ">#{xkXdrLb},</if>
			<if test="xkXkbh != null  and xkXkbh != ''  ">#{xkXkbh},</if>
			<if test="xkXkjg != null  and xkXkjg != ''  ">#{xkXkjg},</if>
			<if test="xkXkjgdm != null  and xkXkjgdm != ''  ">#{xkXkjgdm},</if>
			<if test="xkXklb != null  and xkXklb != ''  ">#{xkXklb},</if>
			<if test="xkXkws != null  and xkXkws != ''  ">#{xkXkws},</if>
			<if test="xkwjbh != null  and xkwjbh != ''  ">#{xkwjbh},</if>
			<if test="yxqTemp != null  and yxqTemp != ''  ">#{yxqTemp},</if>
			<if test="yxqendTemp != null  and yxqendTemp != ''  ">#{yxqendTemp},</if>
         </trim>
    </insert>
	 
    <update id="updateXzspSgsData" parameterType="XzspSgsData">
        update xzsp_sgs_data
        <trim prefix="SET" suffixOverrides=",">
            <if test="createBy != null  and createBy != ''  ">create_by = #{createBy},</if>
            <if test="createTime != null  ">create_time = #{createTime},</if>
            <if test="creditCode != null  and creditCode != ''  ">credit_code = #{creditCode},</if>
            <if test="dataInfo != null  and dataInfo != ''  ">data_info = #{dataInfo},</if>
            <if test="djzt != null  and djzt != ''  ">djzt = #{djzt},</if>
            <if test="id != null  ">id = #{id},</if>
            <if test="isBs != null  and isBs != ''  ">is_bs = #{isBs},</if>
            <if test="jdrqTemp != null  and jdrqTemp != ''  ">jdrq_temp = #{jdrqTemp},</if>
            <if test="objectName != null  and objectName != ''  ">object_name = #{objectName},</if>
            <if test="publicState != null  and publicState != ''  ">public_state = #{publicState},</if>
            <if test="publicTimeTemp != null  ">public_time_temp = #{publicTimeTemp},</if>
            <if test="remark != null  and remark != ''  ">remark = #{remark},</if>
            <if test="updateBy != null  and updateBy != ''  ">update_by = #{updateBy},</if>
            <if test="updateTime != null  ">update_time = #{updateTime},</if>
            <if test="xkFrZjhm != null  and xkFrZjhm != ''  ">xk_fr_zjhm = #{xkFrZjhm},</if>
            <if test="xkFrZjlx != null  and xkFrZjlx != ''  ">xk_fr_zjlx = #{xkFrZjlx},</if>
            <if test="xkFrdb != null  and xkFrdb != ''  ">xk_frdb = #{xkFrdb},</if>
            <if test="xkLydw != null  and xkLydw != ''  ">xk_lydw = #{xkLydw},</if>
            <if test="xkLydwdm != null  and xkLydwdm != ''  ">xk_lydwdm = #{xkLydwdm},</if>
            <if test="xkNr != null  and xkNr != ''  ">xk_nr = #{xkNr},</if>
            <if test="xkXdrLb != null  and xkXdrLb != ''  ">xk_xdr_lb = #{xkXdrLb},</if>
            <if test="xkXkbh != null  and xkXkbh != ''  ">xk_xkbh = #{xkXkbh},</if>
            <if test="xkXkjg != null  and xkXkjg != ''  ">xk_xkjg = #{xkXkjg},</if>
            <if test="xkXkjgdm != null  and xkXkjgdm != ''  ">xk_xkjgdm = #{xkXkjgdm},</if>
            <if test="xkXklb != null  and xkXklb != ''  ">xk_xklb = #{xkXklb},</if>
            <if test="xkXkws != null  and xkXkws != ''  ">xk_xkws = #{xkXkws},</if>
            <if test="xkwjbh != null  and xkwjbh != ''  ">xkwjbh = #{xkwjbh},</if>
            <if test="yxqTemp != null  and yxqTemp != ''  ">yxq_temp = #{yxqTemp},</if>
            <if test="yxqendTemp != null  and yxqendTemp != ''  ">yxqend_temp = #{yxqendTemp},</if>
        </trim>
        where bs_time_temp = #{bsTimeTemp}
    </update>

	<delete id="deleteXzspSgsDataById" parameterType="String">
        delete from xzsp_sgs_data where bs_time_temp = #{bsTimeTemp}
    </delete>
	
    <delete id="deleteXzspSgsDataByIds" parameterType="String">
        delete from xzsp_sgs_data where bs_time_temp in 
        <foreach item="bsTimeTemp" collection="array" open="(" separator="," close=")">
            #{bsTimeTemp}
        </foreach>
    </delete>
    
</mapper>