From 365b5ad817c9c8a2992d505aa39eccfa2be0460e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 09 Nov 2023 09:39:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 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..7284881 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,15 @@
<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"/>
+ <result property="remark" column="cremark"/>
+ </collection>
+ </resultMap>
+
<!--自定义分页数据查询-->
<select id="selectHouseholdPage" resultMap="householdResultMap">
select * from jczz_household where is_deleted = 0
@@ -52,5 +61,27 @@
and associated_user_id = #{userId}
</select>
+ <!--查询房屋集合信息-->
+ <select id="getHouseholdListByCode" resultMap="householdAndLabelMap" >
+ select
+ jh.*,
+ jhl.id as cid,jhl.*,jhl.remark as cremark
+ from jczz_household jh
+ left join jczz_household_label jhl on jh.id = jhl.household_id
+ where 1=1 and is_deleted = 0
+ and house_code = #{code}
+ </select>
+
+ <!--查询房屋集合信息-按id-->
+ <select id="getHouseholdListById" resultMap="householdAndLabelMap" >
+ select
+ jh.*,
+ jhl.id as cid,jhl.*,jhl.remark as cremark
+ from jczz_household jh
+ left join jczz_household_label jhl on jh.id = jhl.household_id
+ where 1=1 and is_deleted = 0
+ and jh.id = #{household.id}
+ </select>
+
</mapper>
--
Gitblit v1.9.3