From f213e5a87147de99afedf92fe78086c1aaa6d3c1 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 20 Dec 2023 18:23:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 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 7d40566..c43736a 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -131,28 +131,32 @@
 
     <!--自定义分页列表-->
     <select id="selectHousePage" resultMap="houseAndHouseLabelMap">
-        select jh.*,concat(building," ",unit," ",room) as address from jczz_house jh
+        select
+        jh.*,
+        concat(building," ",unit," ",room) as address,
+        jda.town_street_name as townStreetName,jda.nei_name as neiName
+        from jczz_house jh
         left join jczz_doorplate_address jda on jda.address_code = jh.house_code
-        where is_deleted = 0
-        <if test="house.id != null "> and id = #{house.id}</if>
+        where jh.is_deleted = 0
+        <if test="house.id != null "> and jh.id = #{house.id}</if>
         <if test="house.streetCode != null and house.streetCode != ''">
-         and jda.town_street_code like concat('%',#{house.streetCode},'%')
+            and jda.town_street_code like concat('%',#{house.streetCode},'%')
         </if>
-        <if test="house.houseCode != null  and house.houseCode != ''"> and house_code = #{house.houseCode}</if>
-        <if test="house.districtCode != null  and house.districtCode != ''"> and district_code = #{house.districtCode}</if>
+        <if test="house.houseCode != null  and house.houseCode != ''"> and jh.house_code = #{house.houseCode}</if>
+        <if test="house.districtCode != null  and house.districtCode != ''"> and jh.district_code = #{house.districtCode}</if>
         <if test="house.districtName != null  and house.districtName != ''">
-            and district_name like concat('%',#{house.districtName},'%')
-         </if>
+            and jh.district_name like concat('%',#{house.districtName},'%')
+        </if>
         <if test="house.houseName != null  and house.houseName != ''"> and jh.house_name like concat('%',#{house.houseName},'%')</if>
-        <if test="house.phone != null  and house.phone != ''"> and phone = #{house.phone}</if>
-        <if test="house.area != null "> and area = #{house.area}</if>
-        <if test="house.propertyPrice != null "> and property_price = #{house.propertyPrice}</if>
-        <if test="house.serviceDue != null "> and service_due = #{house.serviceDue}</if>
-        <if test="house.floor != null "> and floor = #{house.floor}</if>
-        <if test="house.building != null  and house.building != ''"> and building = #{house.building}</if>
-        <if test="house.unit != null  and house.unit != ''"> and unit = #{house.unit}</if>
-        <if test="house.room != null  and house.room != ''"> and room = #{house.room}</if>
-        <if test="house.buildingNo != null "> and building_no = #{house.buildingNo}</if>
+        <if test="house.phone != null  and house.phone != ''"> and jh.phone = #{house.phone}</if>
+        <if test="house.area != null "> and jh.area = #{house.area}</if>
+        <if test="house.propertyPrice != null "> and jh.property_price = #{house.propertyPrice}</if>
+        <if test="house.serviceDue != null "> and jh.service_due = #{house.serviceDue}</if>
+        <if test="house.floor != null "> and jh.floor = #{house.floor}</if>
+        <if test="house.building != null  and house.building != ''"> and jh.building = #{house.building}</if>
+        <if test="house.unit != null  and house.unit != ''"> and jh.unit = #{house.unit}</if>
+        <if test="house.room != null  and house.room != ''"> and jh.room = #{house.room}</if>
+        <if test="house.buildingNo != null "> and jh.building_no = #{house.buildingNo}</if>
     </select>
 
     <!--房屋自定义详情查询-->

--
Gitblit v1.9.3