<?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.pre_order_cancel_notice.mapper.TGuijiRealEstatePreOrderCancelNoticeMapper">

    <sql id="selectVo">
        select id, YWZH, QLR, QLRZJHM, YWR, YWRZJHM, HTH, ZH, FH, FWYT, FWXZ, JZMJ, ZL, ZXYY, YYGDJZMH from t_guiji_real_estate_pre_order_cancel_notice
    </sql>

    <select id="selectList" parameterType="TGuijiRealEstatePreOrderCancelNotice" resultType="TGuijiRealEstatePreOrderCancelNotice">
        <include refid="selectVo"/>
        <where>
            <if test="YWZH != null  and YWZH != ''"> and YWZH like concat('%', #{YWZH}, '%')</if>
            <if test="QLR != null  and QLR != ''"> and QLR like concat('%', #{QLR}, '%')</if>
            <if test="QLRZJHM != null  and QLRZJHM != ''"> and QLRZJHM like concat('%', #{QLRZJHM}, '%')</if>
            <if test="YWR != null  and YWR != ''"> and YWR like concat('%', #{YWR}, '%')</if>
            <if test="YWRZJHM != null  and YWRZJHM != ''"> and YWRZJHM like concat('%', #{YWRZJHM}, '%')</if>
            <if test="HTH != null  and HTH != ''"> and HTH like concat('%', #{HTH}, '%')</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>
            <if test="ZXYY != null  and ZXYY != ''"> and ZXYY like concat('%', #{ZXYY}, '%')</if>
            <if test="YYGDJZMH != null  and YYGDJZMH != ''"> and YYGDJZMH like concat('%', #{YYGDJZMH}, '%')</if>
        </where>
    </select>

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

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

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

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

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

</mapper>
