<?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.mortgage_change.mapper.TGuijiRealEstateMortgageChangeMapper">

    <sql id="selectVo">
        select id, YWZH, ZWLXQXQ, ZWLXQXZ, DYLX, ZZQE, FWJZ, DBFW, DYHTBH, DYQR, DYQRZJHM, DYR, DYRZJHM, ZWR, ZWRZJHM, TXQZH, SYQZH, ZH, FH, FWYT, FWXZ, JZMJ, YTXQZH, BGYY from t_guiji_real_estate_mortgage_change
    </sql>

    <select id="selectList" parameterType="TGuijiRealEstateMortgageChange" resultType="TGuijiRealEstateMortgageChange">
        <include refid="selectVo"/>
        <where>
            <if test="YWZH != null  and YWZH != ''"> and YWZH like concat('%', #{YWZH}, '%')</if>
            <if test="ZWLXQXQ != null  and ZWLXQXQ != ''"> and ZWLXQXQ like concat('%', #{ZWLXQXQ}, '%')</if>
            <if test="ZWLXQXZ != null  and ZWLXQXZ != ''"> and ZWLXQXZ like concat('%', #{ZWLXQXZ}, '%')</if>
            <if test="DYLX != null  and DYLX != ''"> and DYLX like concat('%', #{DYLX}, '%')</if>
            <if test="ZZQE != null  and ZZQE != ''"> and ZZQE like concat('%', #{ZZQE}, '%')</if>
            <if test="FWJZ != null  and FWJZ != ''"> and FWJZ like concat('%', #{FWJZ}, '%')</if>
            <if test="DBFW != null  and DBFW != ''"> and DBFW like concat('%', #{DBFW}, '%')</if>
            <if test="DYHTBH != null  and DYHTBH != ''"> and DYHTBH like concat('%', #{DYHTBH}, '%')</if>
            <if test="DYQR != null  and DYQR != ''"> and DYQR like concat('%', #{DYQR}, '%')</if>
            <if test="DYQRZJHM != null  and DYQRZJHM != ''"> and DYQRZJHM like concat('%', #{DYQRZJHM}, '%')</if>
            <if test="DYR != null  and DYR != ''"> and DYR like concat('%', #{DYR}, '%')</if>
            <if test="DYRZJHM != null  and DYRZJHM != ''"> and DYRZJHM like concat('%', #{DYRZJHM}, '%')</if>
            <if test="ZWR != null  and ZWR != ''"> and ZWR like concat('%', #{ZWR}, '%')</if>
            <if test="ZWRZJHM != null  and ZWRZJHM != ''"> and ZWRZJHM like concat('%', #{ZWRZJHM}, '%')</if>
            <if test="TXQZH != null  and TXQZH != ''"> and TXQZH like concat('%', #{TXQZH}, '%')</if>
            <if test="SYQZH != null  and SYQZH != ''"> and SYQZH like concat('%', #{SYQZH}, '%')</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="YTXQZH != null  and YTXQZH != ''"> and YTXQZH like concat('%', #{YTXQZH}, '%')</if>
            <if test="BGYY != null  and BGYY != ''"> and BGYY like concat('%', #{BGYY}, '%')</if>
        </where>
    </select>

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

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

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

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

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

</mapper>
