From 80d384b639f7bdc9f325d9b1fa51a95beb3093c1 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 20 Dec 2023 15:53:19 +0800
Subject: [PATCH] 统计接口优化
---
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 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 5e6d16b..bb019e7 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -263,6 +263,17 @@
WHERE
jda.nei_code = #{code}
AND jh.is_deleted = 0
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="unitCode != null and unitCode != ''">
+ and jda.unit_code=#{unitCode}
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT DISTINCT
@@ -294,6 +305,19 @@
WHERE
jda.nei_code = #{code}
AND jh.is_deleted = 0
+
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="unitCode != null and unitCode != ''">
+ and jda.unit_code=#{unitCode}
+ AND jda.unit_code is not null
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT DISTINCT
@@ -321,6 +345,18 @@
WHERE
jda.nei_code = #{code}
AND jhh.is_deleted = 0
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="unitCode != null and unitCode != ''">
+ and jda.unit_code=#{unitCode}
+ AND jda.unit_code is not null
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT
@@ -350,6 +386,18 @@
WHERE
jda.nei_code = #{code}
AND jh.is_deleted = 0
+ AND jda.unit_code is not null
+ <if test="buildingCode != null and buildingCode != ''">
+ and jda.building_code=#{buildingCode}
+ </if>
+
+ <if test="unitCode != null and unitCode != ''">
+ and jda.unit_code=#{unitCode}
+ </if>
+
+ <if test="aoiCode != null and aoiCode != ''">
+ and jda.aoi_code=#{aoiCode}
+ </if>
<if test="userId != null">
AND jda.address_code IN (
SELECT DISTINCT
--
Gitblit v1.9.3