From 811bec0382e7202aafdca01d2f64bd8456905fd8 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 31 Oct 2023 17:23:06 +0800
Subject: [PATCH] 户室信息查看修改

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
index e9661e6..792e251 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -39,6 +39,14 @@
         <result column="is_deleted" property="isDeleted"/>
     </resultMap>
 
+    <resultMap id="householdAndLabelMap" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true">
+        <id property="id" column="id"/>
+        <collection property="householdLabelList" javaType="java.util.List"
+                    ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true">
+            <id property="id" column="cid"/>
+        </collection>
+    </resultMap>
+
     <!--自定义分页数据查询-->
     <select id="selectHouseholdPage" resultMap="householdResultMap">
         select * from jczz_household where is_deleted = 0
@@ -52,5 +60,16 @@
         and associated_user_id = #{userId}
     </select>
 
+    <!--查询房屋集合信息-->
+    <select id="getHouseholdListByCode" resultMap="householdAndLabelMap" >
+        select
+            jh.*,
+            jhl.id as cid,jhl.*
+        from jczz_household jh
+        left join jczz_household_label jhl on jh.id = jhl.household_id
+        where 1=1
+        and house_code = #{code}
+    </select>
+
 
 </mapper>

--
Gitblit v1.9.3