顾绍勇 5 лет назад
Родитель
Сommit
f0ccc85c90
1 измененных файлов: 8 добавлений и 3 удалений
  1. 8
    3
      src/main/resources/mapper/TaHousingResourcesMapper.xml

+ 8
- 3
src/main/resources/mapper/TaHousingResourcesMapper.xml Просмотреть файл

@@ -293,9 +293,14 @@
293 293
         <if test="roomName != null and roomName != ''">
294 294
             AND t.room_name like CONCAT('%',#{roomName}, '%')
295 295
         </if>
296
-        <if test="lockingStatus != null and lockingStatus != ''">
297
-            AND t.house_locking_status = #{lockingStatus}
298
-        </if>
296
+        <choose>
297
+            <when test="lockingStatus == 'unlocked'">
298
+                AND (t.house_locking_status = #{lockingStatus} OR t.house_locking_status IS NOT NULL)
299
+            </when>
300
+            <when test="lockingStatus != null and lockingStatus != ''">
301
+                AND t.house_locking_status = #{lockingStatus}
302
+            </when>
303
+        </choose>
299 304
         <if test="actulStartHot != '' and actulStartHot != null">
300 305
             and t.real_heat &gt;= #{actulStartHot}
301 306
         </if>