<?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.GridPendingPeopleMapper">
  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.grid.GridPendingPeople">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
    <result column="person_name" jdbcType="VARCHAR" property="personName" />
    <result column="id_card" jdbcType="VARCHAR" property="idCard" />
    <result column="sex" jdbcType="VARCHAR" property="sex" />
    <result column="native_place" jdbcType="VARCHAR" property="nativePlace" />
    <result column="birthday" jdbcType="VARCHAR" property="birthday" />
    <result column="registered_address" jdbcType="VARCHAR" property="registeredAddress" />
    <result column="mz_code" jdbcType="VARCHAR" property="mzCode" />
    <result column="hyzk_code" jdbcType="VARCHAR" property="hyzkCode" />
    <result column="whcd_code" jdbcType="VARCHAR" property="whcdCode" />
    <result column="zzmm_code" jdbcType="VARCHAR" property="zzmmCode" />
    <result column="wg_code" jdbcType="VARCHAR" property="wgCode" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <result column="rklx_code" jdbcType="VARCHAR" property="rklxCode" />
    <result column="rkbq_code" jdbcType="VARCHAR" property="rkbqCode" />
    <result column="open_id" jdbcType="VARCHAR" property="openId" />
    <result column="create_time" jdbcType="VARCHAR" property="createTime" />
    <result column="update_time" jdbcType="VARCHAR" property="updateTime" />
    <result column="create_id" jdbcType="VARCHAR" property="createId" />
    <result column="update_id" jdbcType="VARCHAR" property="updateId" />
    <result column="status" jdbcType="VARCHAR" property="status" />
  </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, avatar, person_name, id_card, sex, native_place, birthday, registered_address,
    mz_code, hyzk_code, whcd_code, zzmm_code, wg_code, phone, address, rklx_code, rkbq_code,
    open_id, create_time, update_time, create_id, update_id, status
  </sql>
  <select id="selectByExample" parameterType="com.ruoyi.system.domain.grid.GridPendingPeopleExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from grid_pending_people
    <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_pending_people
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from grid_pending_people
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.ruoyi.system.domain.grid.GridPendingPeopleExample">
    delete from grid_pending_people
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.ruoyi.system.domain.grid.GridPendingPeople">
    insert into grid_pending_people (id, avatar, person_name,
      id_card, sex, native_place,
      birthday, registered_address, mz_code,
      hyzk_code, whcd_code, zzmm_code,
      wg_code, phone, address,
      rklx_code, rkbq_code, open_id,
      create_time, update_time, create_id,
      update_id, status)
    values (#{id,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{personName,jdbcType=VARCHAR},
      #{idCard,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{nativePlace,jdbcType=VARCHAR},
      #{birthday,jdbcType=VARCHAR}, #{registeredAddress,jdbcType=VARCHAR}, #{mzCode,jdbcType=VARCHAR},
      #{hyzkCode,jdbcType=VARCHAR}, #{whcdCode,jdbcType=VARCHAR}, #{zzmmCode,jdbcType=VARCHAR},
      #{wgCode,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
      #{rklxCode,jdbcType=VARCHAR}, #{rkbqCode,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR},
      #{createTime,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR},
      #{updateId,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.ruoyi.system.domain.grid.GridPendingPeople">
    insert into grid_pending_people
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="avatar != null">
        avatar,
      </if>
      <if test="personName != null">
        person_name,
      </if>
      <if test="idCard != null">
        id_card,
      </if>
      <if test="sex != null">
        sex,
      </if>
      <if test="nativePlace != null">
        native_place,
      </if>
      <if test="birthday != null">
        birthday,
      </if>
      <if test="registeredAddress != null">
        registered_address,
      </if>
      <if test="mzCode != null">
        mz_code,
      </if>
      <if test="hyzkCode != null">
        hyzk_code,
      </if>
      <if test="whcdCode != null">
        whcd_code,
      </if>
      <if test="zzmmCode != null">
        zzmm_code,
      </if>
      <if test="wgCode != null">
        wg_code,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="address != null">
        address,
      </if>
      <if test="rklxCode != null">
        rklx_code,
      </if>
      <if test="rkbqCode != null">
        rkbq_code,
      </if>
      <if test="openId != null">
        open_id,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="createId != null">
        create_id,
      </if>
      <if test="updateId != null">
        update_id,
      </if>
      <if test="status != null">
        status,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="avatar != null">
        #{avatar,jdbcType=VARCHAR},
      </if>
      <if test="personName != null">
        #{personName,jdbcType=VARCHAR},
      </if>
      <if test="idCard != null">
        #{idCard,jdbcType=VARCHAR},
      </if>
      <if test="sex != null">
        #{sex,jdbcType=VARCHAR},
      </if>
      <if test="nativePlace != null">
        #{nativePlace,jdbcType=VARCHAR},
      </if>
      <if test="birthday != null">
        #{birthday,jdbcType=VARCHAR},
      </if>
      <if test="registeredAddress != null">
        #{registeredAddress,jdbcType=VARCHAR},
      </if>
      <if test="mzCode != null">
        #{mzCode,jdbcType=VARCHAR},
      </if>
      <if test="hyzkCode != null">
        #{hyzkCode,jdbcType=VARCHAR},
      </if>
      <if test="whcdCode != null">
        #{whcdCode,jdbcType=VARCHAR},
      </if>
      <if test="zzmmCode != null">
        #{zzmmCode,jdbcType=VARCHAR},
      </if>
      <if test="wgCode != null">
        #{wgCode,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="rklxCode != null">
        #{rklxCode,jdbcType=VARCHAR},
      </if>
      <if test="rkbqCode != null">
        #{rkbqCode,jdbcType=VARCHAR},
      </if>
      <if test="openId != null">
        #{openId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        #{createId,jdbcType=VARCHAR},
      </if>
      <if test="updateId != null">
        #{updateId,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.ruoyi.system.domain.grid.GridPendingPeopleExample" resultType="java.lang.Long">
    select count(*) from grid_pending_people
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update grid_pending_people
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.avatar != null">
        avatar = #{record.avatar,jdbcType=VARCHAR},
      </if>
      <if test="record.personName != null">
        person_name = #{record.personName,jdbcType=VARCHAR},
      </if>
      <if test="record.idCard != null">
        id_card = #{record.idCard,jdbcType=VARCHAR},
      </if>
      <if test="record.sex != null">
        sex = #{record.sex,jdbcType=VARCHAR},
      </if>
      <if test="record.nativePlace != null">
        native_place = #{record.nativePlace,jdbcType=VARCHAR},
      </if>
      <if test="record.birthday != null">
        birthday = #{record.birthday,jdbcType=VARCHAR},
      </if>
      <if test="record.registeredAddress != null">
        registered_address = #{record.registeredAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.mzCode != null">
        mz_code = #{record.mzCode,jdbcType=VARCHAR},
      </if>
      <if test="record.hyzkCode != null">
        hyzk_code = #{record.hyzkCode,jdbcType=VARCHAR},
      </if>
      <if test="record.whcdCode != null">
        whcd_code = #{record.whcdCode,jdbcType=VARCHAR},
      </if>
      <if test="record.zzmmCode != null">
        zzmm_code = #{record.zzmmCode,jdbcType=VARCHAR},
      </if>
      <if test="record.wgCode != null">
        wg_code = #{record.wgCode,jdbcType=VARCHAR},
      </if>
      <if test="record.phone != null">
        phone = #{record.phone,jdbcType=VARCHAR},
      </if>
      <if test="record.address != null">
        address = #{record.address,jdbcType=VARCHAR},
      </if>
      <if test="record.rklxCode != null">
        rklx_code = #{record.rklxCode,jdbcType=VARCHAR},
      </if>
      <if test="record.rkbqCode != null">
        rkbq_code = #{record.rkbqCode,jdbcType=VARCHAR},
      </if>
      <if test="record.openId != null">
        open_id = #{record.openId,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=VARCHAR},
      </if>
      <if test="record.createId != null">
        create_id = #{record.createId,jdbcType=VARCHAR},
      </if>
      <if test="record.updateId != null">
        update_id = #{record.updateId,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update grid_pending_people
    set id = #{record.id,jdbcType=VARCHAR},
      avatar = #{record.avatar,jdbcType=VARCHAR},
      person_name = #{record.personName,jdbcType=VARCHAR},
      id_card = #{record.idCard,jdbcType=VARCHAR},
      sex = #{record.sex,jdbcType=VARCHAR},
      native_place = #{record.nativePlace,jdbcType=VARCHAR},
      birthday = #{record.birthday,jdbcType=VARCHAR},
      registered_address = #{record.registeredAddress,jdbcType=VARCHAR},
      mz_code = #{record.mzCode,jdbcType=VARCHAR},
      hyzk_code = #{record.hyzkCode,jdbcType=VARCHAR},
      whcd_code = #{record.whcdCode,jdbcType=VARCHAR},
      zzmm_code = #{record.zzmmCode,jdbcType=VARCHAR},
      wg_code = #{record.wgCode,jdbcType=VARCHAR},
      phone = #{record.phone,jdbcType=VARCHAR},
      address = #{record.address,jdbcType=VARCHAR},
      rklx_code = #{record.rklxCode,jdbcType=VARCHAR},
      rkbq_code = #{record.rkbqCode,jdbcType=VARCHAR},
      open_id = #{record.openId,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=VARCHAR},
      create_id = #{record.createId,jdbcType=VARCHAR},
      update_id = #{record.updateId,jdbcType=VARCHAR},
      status = #{record.status,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.system.domain.grid.GridPendingPeople">
    update grid_pending_people
    <set>
      <if test="avatar != null">
        avatar = #{avatar,jdbcType=VARCHAR},
      </if>
      <if test="personName != null">
        person_name = #{personName,jdbcType=VARCHAR},
      </if>
      <if test="idCard != null">
        id_card = #{idCard,jdbcType=VARCHAR},
      </if>
      <if test="sex != null">
        sex = #{sex,jdbcType=VARCHAR},
      </if>
      <if test="nativePlace != null">
        native_place = #{nativePlace,jdbcType=VARCHAR},
      </if>
      <if test="birthday != null">
        birthday = #{birthday,jdbcType=VARCHAR},
      </if>
      <if test="registeredAddress != null">
        registered_address = #{registeredAddress,jdbcType=VARCHAR},
      </if>
      <if test="mzCode != null">
        mz_code = #{mzCode,jdbcType=VARCHAR},
      </if>
      <if test="hyzkCode != null">
        hyzk_code = #{hyzkCode,jdbcType=VARCHAR},
      </if>
      <if test="whcdCode != null">
        whcd_code = #{whcdCode,jdbcType=VARCHAR},
      </if>
      <if test="zzmmCode != null">
        zzmm_code = #{zzmmCode,jdbcType=VARCHAR},
      </if>
      <if test="wgCode != null">
        wg_code = #{wgCode,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
      <if test="rklxCode != null">
        rklx_code = #{rklxCode,jdbcType=VARCHAR},
      </if>
      <if test="rkbqCode != null">
        rkbq_code = #{rkbqCode,jdbcType=VARCHAR},
      </if>
      <if test="openId != null">
        open_id = #{openId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        create_id = #{createId,jdbcType=VARCHAR},
      </if>
      <if test="updateId != null">
        update_id = #{updateId,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ruoyi.system.domain.grid.GridPendingPeople">
    update grid_pending_people
    set avatar = #{avatar,jdbcType=VARCHAR},
      person_name = #{personName,jdbcType=VARCHAR},
      id_card = #{idCard,jdbcType=VARCHAR},
      sex = #{sex,jdbcType=VARCHAR},
      native_place = #{nativePlace,jdbcType=VARCHAR},
      birthday = #{birthday,jdbcType=VARCHAR},
      registered_address = #{registeredAddress,jdbcType=VARCHAR},
      mz_code = #{mzCode,jdbcType=VARCHAR},
      hyzk_code = #{hyzkCode,jdbcType=VARCHAR},
      whcd_code = #{whcdCode,jdbcType=VARCHAR},
      zzmm_code = #{zzmmCode,jdbcType=VARCHAR},
      wg_code = #{wgCode,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      rklx_code = #{rklxCode,jdbcType=VARCHAR},
      rkbq_code = #{rkbqCode,jdbcType=VARCHAR},
      open_id = #{openId,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=VARCHAR},
      create_id = #{createId,jdbcType=VARCHAR},
      update_id = #{updateId,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>
