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

    <!-- 通用查询映射结果 -->
    <resultMap id="authorizeRecordsResultMap" type="org.springblade.estate.entity.AuthorizeRecords">
        <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="user_id" property="userId"/>
        <result column="user_name" property="userName"/>
        <result column="user_type" property="userType"/>
        <result column="device_serial_num" property="deviceSerialNum"/>
        <result column="device_name" property="deviceName"/>
        <result column="device_address" property="deviceAddress"/>
        <result column="auth_req_no" property="authReqNo"/>
        <result column="auth_cmd" property="authCmd"/>
        <result column="auth_status" property="authStatus"/>
        <result column="auth_req_data" property="authReqData"/>
        <result column="auth_resp_data" property="authRespData"/>
        <result column="auth_resp_msg" property="authRespMsg"/>
        <result column="agency_id" property="agencyId"/>
        <result column="residential_id" property="residentialId"/>
        <result column="building_id" property="buildingId"/>
        <result column="unit_id" property="unitId"/>
        <result column="room_id" property="roomId"/>
        <result column="enterprise_id" property="enterpriseId"/>
        <result column="agency_name" property="agencyName"/>
        <result column="residential_name" property="residentialName"/>
        <result column="building_name" property="buildingName"/>
        <result column="unit_name" property="unitName"/>
        <result column="room_name" property="roomName"/>
        <result column="enterprise_name" property="enterpriseName"/>
    </resultMap>


    <select id="selectAuthorizeRecordsPage" resultMap="authorizeRecordsResultMap">
        select * from estate_authorize_records where is_deleted = 0
    </select>

</mapper>
