From eb55b4133ae6b3df80d8d14fbc5b32928f296fd7 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 26 Dec 2023 14:17:07 +0800
Subject: [PATCH] bug修复
---
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
index 06f98e1..c2310b1 100644
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
@@ -25,19 +25,26 @@
<!--自定义分页查询-->
<select id="selectPropertyCompanyDistrictPage" resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO">
- select * from jczz_property_company_district
- where is_deleted = 0
+ select
+ jpcd.*,
+ jd.name as districtName
+ from jczz_property_company_district jpcd
+ left join jczz_district jd on jd.id = jpcd.district_id and jd.is_deleted = 0
+ where jpcd.is_deleted = 0
<if test="propertyCompanyDistrict.propertyCompanyId!=null">
- and property_company_id = #{propertyCompanyDistrict.propertyCompanyId}
+ and jpcd.property_company_id = #{propertyCompanyDistrict.propertyCompanyId}
</if>
<if test="propertyCompanyDistrict.districtId!=null">
- and district_id = #{propertyCompanyDistrict.districtId}
+ and jpcd.district_id = #{propertyCompanyDistrict.districtId}
</if>
<if test="propertyCompanyDistrict.propertyStage!=null">
- and property_stage = #{propertyCompanyDistrict.propertyStage}
+ and jpcd.property_stage = #{propertyCompanyDistrict.propertyStage}
</if>
<if test="propertyCompanyDistrict.principal!=null and propertyCompanyDistrict.principal!=''">
- and principal like concat('%',#{propertyCompanyDistrict.principal},'%')
+ and jpcd.principal like concat('%',#{propertyCompanyDistrict.principal},'%')
+ </if>
+ <if test="propertyCompanyDistrict.districtName!=null and propertyCompanyDistrict.districtName!=''">
+ and jd.name like concat('%',#{propertyCompanyDistrict.districtName},'%')
</if>
</select>
--
Gitblit v1.9.3