<?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.GuestAuthorizeMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="guestAuthorizeResultMap" type="org.springblade.estate.entity.GuestAuthorize">
        <id 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_type" property="guestType"/>
        <result column="guest_name" property="guestName"/>
        <result column="guest_tel" property="guestTel"/>
        <result column="room_id" property="roomId"/>
        <result column="room_name" property="roomName"/>
        <result column="unit_id" property="unitId"/>
        <result column="unit_name" property="unitName"/>
        <result column="building_id" property="buildingId"/>
        <result column="building_name" property="buildingName"/>
        <result column="user_id" property="userId"/>
        <result column="user_name" property="userName"/>
        <result column="access_count" property="accessCount"/>
        <result column="begin_date" property="beginDate"/>
        <result column="end_date" property="endDate"/>
        <result column="residential_id" property="residentialId"/>
        <result column="residential_name" property="residentialName"/>
        <result column="enable_type" property="enableType"/>
        <result column="enterprise_id" property="enterpriseId"/>
        <result column="enterprise_name" property="enterpriseName"/>
        <result column="org_position" property="orgPosition"/>
        <result column="guest_enterprise_name" property="guestEnterpriseName"/>
        <result column="agency_id" property="agencyId"/>
        <result column="agency_name" property="agencyName"/>

    </resultMap>


    <select id="selectGuestAuthorizePage" resultMap="guestAuthorizeResultMap">
        select * from estate_guest_authorize where is_deleted = 0
    </select>

</mapper>
