From 0b3ff378a9faaf9d7a4831b7f0de67378fe0dfea Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:20:15 +0800
Subject: [PATCH] optimize 统计

---
 java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml
index dd713ce..8efa808 100644
--- a/java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml
@@ -37,6 +37,9 @@
         <if test="unitNum !=null and unitNum != ''">
             and t.unit_num= #{unitNum}
         </if>
+        <if test='roomUnit == "Y"'>
+            and t.unit_num != '0'
+        </if>
         <if test="lift !=null and lift != ''">
             and t.lift= #{lift}
         </if>
@@ -45,9 +48,6 @@
         </if>
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
-        </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
         </if>
         order by t.create_time desc
         <if test="page != -1 and page != null ">
@@ -111,6 +111,9 @@
         <if test="unitNum !=null and unitNum != ''">
             and t.unit_num= #{unitNum}
         </if>
+        <if test='roomUnit == "Y"'>
+            and t.unit_num != '0'
+        </if>
         <if test="lift !=null and lift != ''">
             and t.lift= #{lift}
         </if>
@@ -120,11 +123,6 @@
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
         </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
-        </if>
-
-
     </select>
 
 </mapper>

--
Gitblit v1.8.0