From f42983b35c738a28ed4b9d1732d1045c5f2a19bb Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期日, 09 五月 2021 16:57:12 +0800
Subject: [PATCH] 优化代码

---
 java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index babf9d0..fb1407a
--- a/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
@@ -656,14 +656,16 @@
         t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,
         u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum,f.floor_area floorArea,u.unit_area unitArea,td.name
-        stateName,t.room_type roomType,t.room_type
+        stateName,t.room_type roomType,t.room_type,t.`community_id` communityId
         FROM building_room t
         inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0'
         inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` =
         '0'
         left join t_dict td on t.state = td.status_cd and td.table_name = 'building_room' and td.table_columns = 'state'
         WHERE 1 =1
-        AND t.`community_id` = #{communityId}
+        <if test="floorId !=null and floorId != ''">
+            AND t.`community_id` = #{communityId}
+        </if>
         <if test="floorId !=null and floorId != ''">
             and f.`floor_id`= #{floorId}
         </if>

--
Gitblit v1.8.0