<?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.community.agency.mapper.AgencyMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="agencyResultMap" type="org.springblade.community.agency.entity.Agency">
        <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="agency_name" property="agencyName"/>
        <result column="agency_no" property="agencyNo"/>
        <result column="agency_area" property="agencyArea"/>
        <result column="person_name" property="personName"/>
        <result column="person_phone" property="personPhone"/>
        <result column="remark" property="remark"/>
        <result column="residential_count" property="residentialCount"/>
        <result column="unit_count" property="unitCount"/>
        <result column="room_count" property="roomCount"/>
        <result column="person_count" property="personCount"/>
        <result column="car_count" property="carCount"/>
        <result column="region_province" property="regionProvince"/>
        <result column="region_city" property="regionCity"/>
        <result column="region_area" property="regionArea"/>
        <result column="address" property="address"/>
        <result column="longitude" property="longitude"/>
        <result column="latitude" property="latitude"/>
        <result column="pic" property="pic"/>
        <result column="region_street" property="regionStreet"/>
        <result column="org_position" property="orgPosition"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="old_id" property="oldId"/>
        <result column="password" property="password"/>
        <result column="tenant_password" property="tenantPassword"/>
        <result column="boundary_path" property="boundaryPath"/>
    </resultMap>


    <select id="selectAgencyPage" resultMap="agencyResultMap">
        select * from yc_agency where is_deleted = 0
    </select>

</mapper>
