From d7d9b601b2e4fdb663375993e2cfbdbd363df421 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 11 七月 2023 22:17:37 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml
index 7cc9a72..eef9ee9 100755
--- a/java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml
@@ -93,16 +93,12 @@
     <select id="getUnitInfo" parameterType="Map" resultType="Map">
         select t.floor_id,t.floor_id floorId,t.layer_count,t.layer_count layerCount,t.unit_id,t.unit_id
         unitId,t.unit_num,t.unit_num unitNum,t.lift,t.status_cd,t.status_cd statusCd,t.remark,t.b_id,t.b_id
-        bId,t.user_id,t.user_id userId,t.unit_area,t.unit_area unitArea
+        bId,t.user_id,t.user_id userId,t.unit_area,t.unit_area unitArea,ff.floor_num floorNum
         from building_unit t
-        <if test="communityId!=null and communityId != ''">
-            ,f_floor ff
-        </if>
+        left join f_floor ff on t.`floor_id` = ff.`floor_id` and ff.status_cd = '0'
         where 1 =1
         <if test="communityId!=null and communityId != ''">
-            and t.`floor_id` = ff.`floor_id`
             AND ff.community_id = #{communityId}
-            and ff.status_cd = '0'
         </if>
         <if test="floorId !=null and floorId != ''">
             and t.floor_id= #{floorId}
@@ -112,6 +108,12 @@
         </if>
         <if test="unitId !=null and unitId != ''">
             and t.unit_id= #{unitId}
+        </if>
+        <if test="unitIds !=null">
+            and t.unit_id in
+            <foreach collection="unitIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
         </if>
         <if test="unitNum !=null and unitNum != ''">
             and t.unit_num= #{unitNum}
@@ -131,7 +133,7 @@
         <if test="userId !=null and userId != ''">
             and t.user_id= #{userId}
         </if>
-        order by unitNum asc
+        order by ff.seq,ff.floor_num,t.unit_num asc
        <!-- <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>limit 10;-->
@@ -230,7 +232,7 @@
         <if test="unitId !=null and unitId != ''">
             and t.unit_id= #{unitId}
         </if>
-        <if test="unitNum !=null and unitNum != ''">
+        <if test="unitNum !=null and unitNum != '' or unitNum == 0">
             and t.unit_num= #{unitNum}
         </if>
         <if test="lift !=null and lift != ''">

--
Gitblit v1.8.0