<?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.gird.mapper.GirdMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="girdResultMap" type="org.springblade.community.gird.entity.Gird">
        <result column="id" property="id"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="name" property="name"/>
        <result column="number" property="number"/>
        <result column="residential_count" property="residentialCount"/>
        <result column="unit_count" property="unitCount"/>
        <result column="room_count" property="roomCount"/>
        <result column="people_count" property="peopleCount"/>
        <result column="car_count" property="carCount"/>
        <result column="remark" property="remark"/>
    </resultMap>
    <!-- 通用查询映射结果 -->
    <resultMap id="girdDTOResultMap" type="org.springblade.community.gird.entity.Gird" extends="girdResultMap">
        <result column="residentialIds" property="residentialIds"/>
    </resultMap>


    <select id="selectGirdPage" resultMap="girdResultMap">
        select * from estate_gird where is_deleted = 0
    </select>

    <select id="selectGirdDTOPage" resultMap="girdDTOResultMap">
        select * from estate_gird where is_deleted = 0
    </select>
</mapper>
