From 7b6ad0f09bfc5cd45a1aacfdfe55e69a02b9ff26 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 19 Dec 2023 20:43:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml | 95 ++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 92 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
index 98c0d5d..f85fa3d 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -76,6 +76,51 @@
<!--房屋详情-->
<resultMap id="houseAndHouseLabelMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true">
+ <result column="id" property="id"/>
+ <result column="house_code" property="houseCode"/>
+ <result column="district_code" property="districtCode"/>
+ <result column="district_name" property="districtName"/>
+ <result column="house_name" property="houseName"/>
+ <result column="phone" property="phone"/>
+ <result column="area" property="area"/>
+ <result column="property_price" property="propertyPrice"/>
+ <result column="service_due" property="serviceDue"/>
+ <result column="floor" property="floor"/>
+ <result column="building" property="building"/>
+ <result column="unit" property="unit"/>
+ <result column="room" property="room"/>
+ <result column="building_no" property="buildingNo"/>
+ <result column="image_urls" property="imageUrls"/>
+ <result column="create_user" property="createUser"/>
+ <result column="created_time" property="createTime"/>
+ <result column="update_user" property="updateUser"/>
+ <result column="update_time" property="updateTime"/>
+ <result column="remark" property="remark"/>
+ <result column="is_deleted" property="isDeleted"/>
+ <collection property="userHouseLabelVOList" javaType="java.util.List" select="selectHouseLabelPage" column="house_code"
+ ofType="org.springblade.modules.house.vo.UserHouseLabelVO" 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 house_code = #{houseCode} and lable_type = 2
+ </select>
+
+ <!--房屋详情-->
+ <resultMap id="housePageAndHouseLabelMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true">
<id property="id" column="id"/>
<collection property="userHouseLabelVOList" javaType="java.util.List"
ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
@@ -85,7 +130,7 @@
</resultMap>
<!--自定义分页列表-->
- <select id="selectHousePage" resultType="org.springblade.modules.house.vo.HouseVO">
+ <select id="selectHousePage" resultMap="houseAndHouseLabelMap">
select jh.*,concat(building," ",unit," ",room) as address from jczz_house jh
left join jczz_doorplate_address jda on jda.address_code = jh.house_code
where is_deleted = 0
@@ -116,8 +161,8 @@
jh.*,
jhl.id as cid,jhl.*,jhl.remark as cremark
from jczz_house jh
- left join jczz_user_house_label jhl on jh.house_code = jhl.house_code
- where jh.is_deleted = 0 and jhl.lable_type = 2
+ left join jczz_user_house_label jhl on jh.house_code = jhl.house_code and jhl.lable_type = 2
+ where jh.is_deleted = 0
and jh.house_code = #{house.houseCode}
</select>
@@ -218,6 +263,17 @@
WHERE
jda.nei_code = #{code}
AND jh.is_deleted = 0
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="uniCode != null and uniCode != ''">
+ and jda.unit_code=#{uniCode}
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT DISTINCT
@@ -249,6 +305,17 @@
WHERE
jda.nei_code = #{code}
AND jh.is_deleted = 0
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="uniCode != null and uniCode != ''">
+ and jda.unit_code=#{uniCode}
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT DISTINCT
@@ -276,6 +343,17 @@
WHERE
jda.nei_code = #{code}
AND jhh.is_deleted = 0
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="uniCode != null and uniCode != ''">
+ and jda.unit_code=#{uniCode}
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT
@@ -305,6 +383,17 @@
WHERE
jda.nei_code = #{code}
AND jh.is_deleted = 0
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="uniCode != null and uniCode != ''">
+ and jda.unit_code=#{uniCode}
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT DISTINCT
--
Gitblit v1.9.3