<?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.sooka.system.real_estate.unseal.mapper.TGuijiRealEstateUnsealMapper">

    <sql id="selectVo">
        select id, YWZH, CFJG, CFWH, CFRQ, CFQX, CFQSRQ, CFZZRQ, JFJG, JFWH, JFRQ, BXZR, BXZRZJHM, QZH, ZH, FH, FWYT, FWXZ, JZMJ, ZL from t_guiji_real_estate_unseal
    </sql>

    <select id="selectList" parameterType="TGuijiRealEstateUnseal" resultType="TGuijiRealEstateUnseal">
        <include refid="selectVo"/>
        <where>
            <if test="YWZH != null  and YWZH != ''"> and YWZH like concat('%', #{YWZH}, '%')</if>
            <if test="CFJG != null  and CFJG != ''"> and CFJG like concat('%', #{CFJG}, '%')</if>
            <if test="CFWH != null  and CFWH != ''"> and CFWH like concat('%', #{CFWH}, '%')</if>
            <if test="CFRQ != null  and CFRQ != ''"> and CFRQ like concat('%', #{CFRQ}, '%')</if>
            <if test="CFQX != null  and CFQX != ''"> and CFQX like concat('%', #{CFQX}, '%')</if>
            <if test="CFQSRQ != null  and CFQSRQ != ''"> and CFQSRQ like concat('%', #{CFQSRQ}, '%')</if>
            <if test="CFZZRQ != null  and CFZZRQ != ''"> and CFZZRQ like concat('%', #{CFZZRQ}, '%')</if>
            <if test="JFJG != null  and JFJG != ''"> and JFJG like concat('%', #{JFJG}, '%')</if>
            <if test="JFWH != null  and JFWH != ''"> and JFWH like concat('%', #{JFWH}, '%')</if>
            <if test="JFRQ != null  and JFRQ != ''"> and JFRQ like concat('%', #{JFRQ}, '%')</if>
            <if test="BXZR != null  and BXZR != ''"> and BXZR like concat('%', #{BXZR}, '%')</if>
            <if test="BXZRZJHM != null  and BXZRZJHM != ''"> and BXZRZJHM like concat('%', #{BXZRZJHM}, '%')</if>
            <if test="QZH != null  and QZH != ''"> and QZH like concat('%', #{QZH}, '%')</if>
            <if test="ZH != null  and ZH != ''"> and ZH like concat('%', #{ZH}, '%')</if>
            <if test="FH != null  and FH != ''"> and FH like concat('%', #{FH}, '%')</if>
            <if test="FWYT != null  and FWYT != ''"> and FWYT like concat('%', #{FWYT}, '%')</if>
            <if test="FWXZ != null  and FWXZ != ''"> and FWXZ like concat('%', #{FWXZ}, '%')</if>
            <if test="JZMJ != null  and JZMJ != ''"> and JZMJ like concat('%', #{JZMJ}, '%')</if>
            <if test="ZL != null  and ZL != ''"> and ZL like concat('%', #{ZL}, '%')</if>
        </where>
    </select>

    <select id="selectById" parameterType="String" resultType="TGuijiRealEstateUnseal">
        <include refid="selectVo"/>
        where id = #{id}
    </select>

    <insert id="insert" parameterType="TGuijiRealEstateUnseal">
        insert into t_guiji_real_estate_unseal
        <trim prefix="(" suffix=")" suffixOverrides=",">
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
         </trim>
    </insert>

    <update id="update" parameterType="TGuijiRealEstateUnseal">
        update t_guiji_real_estate_unseal
        <trim prefix="SET" suffixOverrides=",">
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteById" parameterType="String">
        delete from t_guiji_real_estate_unseal where id = #{id}
    </delete>

    <delete id="deleteByIds" parameterType="String">
        delete from t_guiji_real_estate_unseal where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>

</mapper>
