From ede1ff3b4482bb7e712d1a8563a56a66d349321c Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 18 Dec 2023 14:00:01 +0800
Subject: [PATCH] 住户和房屋列表接口优化
---
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 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 b08e12d..11fe4a6 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -89,8 +89,31 @@
</collection>
</resultMap>
+ <resultMap id="householdPageAndLabelMap" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true">
+ <id property="id" column="id"/>
+ <collection property="householdLabelList" javaType="java.util.List" select="selectHouseLabelPage" column="id"
+ ofType="org.springblade.modules.house.vo.HouseholdLabelVO" autoMapping="true">
+ </collection>
+ </resultMap>
+
+ <select id="selectHouseLabelPage" resultType="org.springblade.modules.house.vo.HouseholdLabelVO">
+ select
+ id,
+ house_code,
+ label_id,
+ label_name,
+ color,
+ remark cremark,
+ user_id,
+ lable_type,
+ household_id
+ from
+ jczz_user_house_label
+ where household_id = #{id} and lable_type = 1
+ </select>
+
<!--自定义分页数据查询-->
- <select id="selectHouseholdPage" resultType="org.springblade.modules.house.vo.HouseholdVO">
+ <select id="selectHouseholdPage" resultMap="householdPageAndLabelMap">
select
jh.*,
jhs.district_name aoiName,
--
Gitblit v1.9.3