From 04a0b7a7cae7bee8808bbc3587dddc4f955d204f Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Fri, 26 Jan 2024 13:46:57 +0800
Subject: [PATCH] bug 修复
---
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml | 46 ++++++++++++++++++++++++++++++++--------------
1 files changed, 32 insertions(+), 14 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 c3e33ab..b33fe92 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -660,18 +660,40 @@
<select id="labelCommunityStatistics" resultType="java.util.Map">
+ SELECT
+ br.code,
+ br.name,
+ br.id
+ FROM
+ blade_region br
+ <where>
+ <if test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ br.code IN
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </if>
+ and br.parent_code = '361102'
+ </where>
+ </select>
+
+ <select id="getlabelCount" resultType="org.springblade.modules.label.vo.LabelVO">
SELECT
- jc.name,
- (SELECT
- count(DISTINCT jhl.house_code)
+ jl.label_name,
+ ( SELECT
+ count( DISTINCT jhl.house_code )
FROM
jczz_user_house_label jhl
LEFT JOIN jczz_house jh ON jhl.house_code = jh.house_code
LEFT JOIN jczz_grid jg ON jg.grid_code = jh.grid_code
AND jg.is_deleted = 0
+ LEFT JOIN jczz_community jc ON jc.CODE = jg.community_code
LEFT JOIN blade_region br ON br.CODE = jg.community_code
- WHERE jhl.lable_type = 2 and jg.community_code = jc.code
+ WHERE
+ jhl.lable_type = 2
+ AND jl.id = jhl.label_id
+ AND jc.street_code = #{streetCode}
<if test="house.townStreetName!=null and house.townStreetName!=''">
and br.town_name like concat('%',#{house.townStreetName},'%')
</if>
@@ -712,17 +734,13 @@
AND juhl.label_id IS NOT NULL
)
</if>
- )counts
+ ) num
FROM
- jczz_community jc
- <where>
- <if test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- jc.CODE IN
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
- </if>
- </where>
+ jczz_label jl
+ WHERE
+ jl.parent_id = '1001'
+ ORDER BY
+ jl.sort DESC
</select>
--
Gitblit v1.9.3