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
         f.floor_area floorArea
         FROM
         FROM
         f_floor f
         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 != ''">
         <if test="floorId !=null and floorId != ''">
             and f.floor_id= #{floorId}
             and f.floor_id= #{floorId}
         </if>
         </if>