wuxw
2023-11-06 4f3b666cd625381e4acb07d8ae4d68ae9554b1b8
java110-db/src/main/resources/mapper/report/BaseDataStatisticsServiceDaoImplMapper.xml
@@ -1,20 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="baseDataStatisticsServiceDaoImpl">
    <!-- 查询房屋数 -->
    <select id="getRoomCount" parameterType="Map" resultType="Map">
        select count(1) count
        from building_room t
        inner join building_unit bu on t.unit_id = bu.unit_id and bu.status_cd = '0'
        inner join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
        <if test="ownerId != null and ownerId != ''">
            inner join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0'
            left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0'
        </if>
        inner join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0'
        left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0'
        where 1=1
        and t.status_cd = '0'
        <if test="floorId != null and floorId != ''">
@@ -105,9 +101,7 @@
        </if>
    </select>
    <select id="getReceivedRoomCount" parameterType="Map" resultType="Map">
        select count(1) count
        from
        (select t.room_id
@@ -227,7 +221,6 @@
    </select>
    <select id="getOweRoomCount" parameterType="Map" resultType="Map">
        select count(1) count
        from
        (select t.room_id
@@ -648,7 +641,6 @@
            limit #{page},#{row}
        </if>
    </select>
</mapper>