<?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.ruoyi.system.mapper.grid.GridHouseInterviewMapper">
  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.grid.GridHouseInterview">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="house_id" jdbcType="VARCHAR" property="houseId" />
    <result column="country" jdbcType="VARCHAR" property="country" />
    <result column="wg_code" jdbcType="VARCHAR" property="wgCode" />
    <result column="wg_value" jdbcType="VARCHAR" property="wgValue" />
    <result column="interview_time" jdbcType="VARCHAR" property="interviewTime" />
    <result column="house_name" jdbcType="VARCHAR" property="houseName" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="create_id" jdbcType="VARCHAR" property="createId" />
    <result column="create_name" jdbcType="VARCHAR" property="createName" />
    <result column="create_time" jdbcType="VARCHAR" property="createTime" />
    <result column="longitude" jdbcType="VARCHAR" property="longitude" />
    <result column="latitude" jdbcType="VARCHAR" property="latitude" />
    <result column="address" jdbcType="VARCHAR" property="address" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, house_id, country, wg_code, wg_value, interview_time, house_name, content, create_id,
    create_name, create_time, longitude, latitude, address
  </sql>
  <select id="selectByExample" parameterType="com.ruoyi.system.domain.grid.GridHouseInterviewExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from grid_house_interview
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from grid_house_interview
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from grid_house_interview
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.ruoyi.system.domain.grid.GridHouseInterviewExample">
    delete from grid_house_interview
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.ruoyi.system.domain.grid.GridHouseInterview">
    insert into grid_house_interview (id, house_id, country,
      wg_code, wg_value, interview_time,
      house_name, content, create_id,
      create_name, create_time, longitude,
      latitude, address)
    values (#{id,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR},
      #{wgCode,jdbcType=VARCHAR}, #{wgValue,jdbcType=VARCHAR}, #{interviewTime,jdbcType=VARCHAR},
      #{houseName,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR},
      #{createName,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
      #{latitude,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.ruoyi.system.domain.grid.GridHouseInterview" keyProperty="id" useGeneratedKeys="true">
    insert into grid_house_interview
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="houseId != null">
        house_id,
      </if>
      <if test="country != null">
        country,
      </if>
      <if test="wgCode != null">
        wg_code,
      </if>
      <if test="wgValue != null">
        wg_value,
      </if>
      <if test="interviewTime != null">
        interview_time,
      </if>
      <if test="houseName != null">
        house_name,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="createId != null">
        create_id,
      </if>
      <if test="createName != null">
        create_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="longitude != null">
        longitude,
      </if>
      <if test="latitude != null">
        latitude,
      </if>
      <if test="address != null">
        address,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="houseId != null">
        #{houseId,jdbcType=VARCHAR},
      </if>
      <if test="country != null">
        #{country,jdbcType=VARCHAR},
      </if>
      <if test="wgCode != null">
        #{wgCode,jdbcType=VARCHAR},
      </if>
      <if test="wgValue != null">
        #{wgValue,jdbcType=VARCHAR},
      </if>
      <if test="interviewTime != null">
        #{interviewTime,jdbcType=VARCHAR},
      </if>
      <if test="houseName != null">
        #{houseName,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        #{createId,jdbcType=VARCHAR},
      </if>
      <if test="createName != null">
        #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=VARCHAR},
      </if>
      <if test="longitude != null">
        #{longitude,jdbcType=VARCHAR},
      </if>
      <if test="latitude != null">
        #{latitude,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.ruoyi.system.domain.grid.GridHouseInterviewExample" resultType="java.lang.Long">
    select count(*) from grid_house_interview
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update grid_house_interview
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.houseId != null">
        house_id = #{record.houseId,jdbcType=VARCHAR},
      </if>
      <if test="record.country != null">
        country = #{record.country,jdbcType=VARCHAR},
      </if>
      <if test="record.wgCode != null">
        wg_code = #{record.wgCode,jdbcType=VARCHAR},
      </if>
      <if test="record.wgValue != null">
        wg_value = #{record.wgValue,jdbcType=VARCHAR},
      </if>
      <if test="record.interviewTime != null">
        interview_time = #{record.interviewTime,jdbcType=VARCHAR},
      </if>
      <if test="record.houseName != null">
        house_name = #{record.houseName,jdbcType=VARCHAR},
      </if>
      <if test="record.content != null">
        content = #{record.content,jdbcType=VARCHAR},
      </if>
      <if test="record.createId != null">
        create_id = #{record.createId,jdbcType=VARCHAR},
      </if>
      <if test="record.createName != null">
        create_name = #{record.createName,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=VARCHAR},
      </if>
      <if test="record.longitude != null">
        longitude = #{record.longitude,jdbcType=VARCHAR},
      </if>
      <if test="record.latitude != null">
        latitude = #{record.latitude,jdbcType=VARCHAR},
      </if>
      <if test="record.address != null">
        address = #{record.address,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update grid_house_interview
    set id = #{record.id,jdbcType=VARCHAR},
      house_id = #{record.houseId,jdbcType=VARCHAR},
      country = #{record.country,jdbcType=VARCHAR},
      wg_code = #{record.wgCode,jdbcType=VARCHAR},
      wg_value = #{record.wgValue,jdbcType=VARCHAR},
      interview_time = #{record.interviewTime,jdbcType=VARCHAR},
      house_name = #{record.houseName,jdbcType=VARCHAR},
      content = #{record.content,jdbcType=VARCHAR},
      create_id = #{record.createId,jdbcType=VARCHAR},
      create_name = #{record.createName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=VARCHAR},
      longitude = #{record.longitude,jdbcType=VARCHAR},
      latitude = #{record.latitude,jdbcType=VARCHAR},
      address = #{record.address,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.system.domain.grid.GridHouseInterview">
    update grid_house_interview
    <set>
      <if test="houseId != null">
        house_id = #{houseId,jdbcType=VARCHAR},
      </if>
      <if test="country != null">
        country = #{country,jdbcType=VARCHAR},
      </if>
      <if test="wgCode != null">
        wg_code = #{wgCode,jdbcType=VARCHAR},
      </if>
      <if test="wgValue != null">
        wg_value = #{wgValue,jdbcType=VARCHAR},
      </if>
      <if test="interviewTime != null">
        interview_time = #{interviewTime,jdbcType=VARCHAR},
      </if>
      <if test="houseName != null">
        house_name = #{houseName,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        create_id = #{createId,jdbcType=VARCHAR},
      </if>
      <if test="createName != null">
        create_name = #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=VARCHAR},
      </if>
      <if test="longitude != null">
        longitude = #{longitude,jdbcType=VARCHAR},
      </if>
      <if test="latitude != null">
        latitude = #{latitude,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ruoyi.system.domain.grid.GridHouseInterview">
    update grid_house_interview
    set house_id = #{houseId,jdbcType=VARCHAR},
      country = #{country,jdbcType=VARCHAR},
      wg_code = #{wgCode,jdbcType=VARCHAR},
      wg_value = #{wgValue,jdbcType=VARCHAR},
      interview_time = #{interviewTime,jdbcType=VARCHAR},
      house_name = #{houseName,jdbcType=VARCHAR},
      content = #{content,jdbcType=VARCHAR},
      create_id = #{createId,jdbcType=VARCHAR},
      create_name = #{createName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=VARCHAR},
      longitude = #{longitude,jdbcType=VARCHAR},
      latitude = #{latitude,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>
