瀏覽代碼

优化代码

java110 5 年之前
父節點
當前提交
a92aa22dc2
共有 1 個文件被更改,包括 4 次插入 和 1 次删除
  1. 4 1
      java110-db/src/main/resources/mapper/community/FloorServiceDaoImplMapper.xml

+ 4 - 1
java110-db/src/main/resources/mapper/community/FloorServiceDaoImplMapper.xml

@@ -202,7 +202,10 @@
         f.floor_area floorArea
         FROM
         f_floor f
-        where f.`community_id` = #{communityId}
+        where 1=1
+        <if test="communityId !=null and communityId != ''">
+            and f.`community_id` = #{communityId}
+        </if>
         <if test="floorId !=null and floorId != ''">
             and f.floor_id= #{floorId}
         </if>