From fda09077e808d21fffa6f0a21aa17801f26060d0 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 26 Dec 2023 20:09:35 +0800
Subject: [PATCH] 扫码限制调整
---
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 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 64f27bc..fdcc0c4 100644
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
@@ -23,9 +23,34 @@
<result column="is_deleted" property="isDeleted"/>
</resultMap>
-
- <select id="selectPropertyCompanyDistrictPage" resultMap="propertyCompanyDistrictResultMap">
- select * from jczz_property_company_district where is_deleted = 0
+ <!--自定义分页查询-->
+ <select id="selectPropertyCompanyDistrictPage" resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO">
+ select
+ jpcd.*,
+ jd.name as districtName,
+ jpc.name as propertyCompanyName
+ from jczz_property_company_district jpcd
+ left join jczz_district jd on jd.id = jpcd.district_id and jd.is_deleted = 0
+ left join jczz_property_company jpc on jpc.id = jpcd.property_company_id and jpc.is_deleted = 0
+ where jpcd.is_deleted = 0
+ <if test="propertyCompanyDistrict.propertyCompanyId!=null">
+ and jpcd.property_company_id = #{propertyCompanyDistrict.propertyCompanyId}
+ </if>
+ <if test="propertyCompanyDistrict.districtId!=null">
+ and jpcd.district_id = #{propertyCompanyDistrict.districtId}
+ </if>
+ <if test="propertyCompanyDistrict.propertyStage!=null">
+ and jpcd.property_stage = #{propertyCompanyDistrict.propertyStage}
+ </if>
+ <if test="propertyCompanyDistrict.principal!=null and 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>
+ <if test="propertyCompanyDistrict.propertyCompanyName!=null and propertyCompanyDistrict.propertyCompanyName!=''">
+ and jpc.name like concat('%',#{propertyCompanyDistrict.propertyCompanyName},'%')
+ </if>
</select>
--
Gitblit v1.9.3