From a02538418011a9e37a15281a87b9a0c2fb9c7eeb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?LI-CCONG=5C=E6=9D=8E=E8=81=AA=E8=81=AA?= <1441652193@qq.com>
Date: Tue, 26 Mar 2024 17:56:14 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E7=82=B9=E3=80=81=E5=88=B0=E7=AB=99?=
=?UTF-8?q?=E5=9B=9E=E6=94=B6=E8=AE=A2=E5=8D=95=E4=B8=9A=E5=8A=A1=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E5=BC=80=E5=8F=91v6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/mapper/RecycleStationMapper.xml | 10 ++++++++--
.../resources/mapper/RecycleStationPriceMapper.xml | 7 ++++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml b/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml
index fd7a918..73c5b54 100644
--- a/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml
+++ b/nxhs-service/src/main/resources/mapper/RecycleStationMapper.xml
@@ -13,9 +13,15 @@
) AS distance
FROM
nx_enterprise_recycle_station a
- ${ew.customSqlSegment}
- AND a.latitude IS NOT NULL
+ WHERE
+ a.latitude IS NOT NULL
AND a.longitude IS NOT NULL
+
+
+ AND
+
+ ${ew.sqlSegment}
+
HAVING
distance <= a.accept_range
ORDER BY
diff --git a/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml b/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml
index 1b1b327..47d1e4a 100644
--- a/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml
+++ b/nxhs-service/src/main/resources/mapper/RecycleStationPriceMapper.xml
@@ -11,7 +11,12 @@
LEFT JOIN nx_price_recycle b ON a.id = b.price_id
WHERE
b.recycle_id = #{stationId}
- and ${ew.sqlSegment}
+
+
+ AND
+
+ ${ew.sqlSegment}
+
ORDER BY
a.f_creator_time DESC
LIMIT 1;