浏览代码

修改房间列表展示

liu 2 年之前
父节点
当前提交
0bd214c793
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/main/resources/mapper/template/HouseNumberMapper.xml

+ 3 - 3
src/main/resources/mapper/template/HouseNumberMapper.xml

@@ -357,9 +357,9 @@
         h.id as houseId
         FROM
         `house_number` hn
-        LEFT JOIN building b ON b.id = hn.building_id
-        LEFT JOIN house_lock hl ON hl.house_number_id = hn.id
-        LEFT JOIN house h ON h.id = hn.house_id
+        LEFT JOIN building b ON b.id = hn.building_id AND b.deleted=0
+        LEFT JOIN house_lock hl ON hl.house_number_id = hn.id  AND hl.deleted=0
+        LEFT JOIN house h ON h.id = hn.house_id AND h.deleted=0
         WHERE
         hn.deleted=0
         <if test="keyWord != null and keyWord != ''">