From d46ca134f82fd106bfbbbd71aef7184805e6d7e7 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Fri, 19 Jan 2024 09:17:54 +0800
Subject: [PATCH] bug 修复
---
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml | 46 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 43 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 81a1a44..c52dad2 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -171,8 +171,18 @@
<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>
- <if test="house.regionCode != null and house.regionCode !='' ">
- and jg.community_code like concat('%',#{house.regionCode},'%')
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jg.community_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jg.community_code in ('')
+ </otherwise>
+ </choose>
</if>
<if test="house.parentId != null ">
and jh.house_code in (
@@ -200,8 +210,38 @@
</select>
+ <!--房屋详情-->
+ <resultMap id="houseAndHouseLabelDetailMap" 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"
+ ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
+ <id property="id" column="cid"/>
+ <result property="remark" column="cremark"/>
+ </collection>
+ </resultMap>
+
<!--房屋自定义详情查询-->
- <select id="getHouseDetail" resultMap="houseAndHouseLabelMap">
+ <select id="getHouseDetail" resultMap="houseAndHouseLabelDetailMap">
select
jh.*,
jhl.id as cid,jhl.*,jhl.remark as cremark,
--
Gitblit v1.9.3