<?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="org.springblade.estate.mapper.GuestRecordMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="guestResultMap" type="org.springblade.estate.entity.GuestRecord">
        <result column="id" property="id"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="guest_name" property="guestName"/>
        <result column="guest_tel" property="guestTel"/>
        <result column="guest_sex" property="guestSex"/>
        <result column="guest_reason" property="guestReason"/>
        <result column="agency_id" property="agencyId"/>
        <result column="agency_name" property="agencyName"/>
        <result column="residential_id" property="residentialId"/>
        <result column="residential_name" property="residentialName"/>
        <result column="building_id" property="buildingId"/>
        <result column="building_name" property="buildingName"/>
        <result column="unit_id" property="unitId"/>
        <result column="unit_name" property="unitName"/>
        <result column="room_id" property="roomId"/>
        <result column="room_name" property="roomName"/>
        <result column="user_name" property="userName"/>
        <result column="user_id" property="userId"/>
        <result column="enterprise_id" property="enterpriseId"/>
        <result column="enterprise_name" property="enterpriseName"/>
        <result column="org_position" property="orgPosition"/>
        <result column="check_state" property="checkState"/>
        <result column="face_url" property="faceUrl"/>
        <result column="image_md5" property="imageMd5"/>
        <result column="open_id" property="openId"/>
        <result column="interview_time" property="interviewTime"/>
        <result column="guest_idcard" property="guestIdcard"/>
        <result column="opinion" property="opinion"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="guest_count" property="guestCount"/>
        <result column="guset_enterprise_name" property="guestEnterpriseName"/>
        <result column="register_source" property="registerSource"/>
        <result column="begin_time" property="beginTime"/>
        <result column="end_time" property="endTime"/>
    </resultMap>


    <select id="selectGuestPage" resultMap="guestResultMap">
        select * from estate_guest where is_deleted = 0
    </select>

</mapper>
