From 79906fbdefbc848afc3416c17f0a091fd7c3b357 Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Sun, 27 Jul 2025 19:56:49 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8D=A2=E5=9B=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/resources/mapper/StatisticsMapper.xml | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/main/resources/mapper/StatisticsMapper.xml b/src/main/resources/mapper/StatisticsMapper.xml
index e5b596f..fe823a0 100644
--- a/src/main/resources/mapper/StatisticsMapper.xml
+++ b/src/main/resources/mapper/StatisticsMapper.xml
@@ -61,20 +61,17 @@
SELECT
IFNULL(count(1), 0) AS count
FROM (
- select 1
- FROM `t_stats_record` r
- left join `t_stats` s on r.trace_id=s.trace_id
- where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
- and action = 'PAYMENT'
- and (identifier = 'PAY_REQ' or identifier = 'PAY_BATCH_REQ' or identifier = 'PAY_SOURCE_REQ' or identifier = 'PAY_BATCH_REQ')
+ select count(1) as count
+ from `order`
+ where scenic_id = #{scenicId}
- and s.create_time >= #{startTime}
+ and create_at >= #{startTime}
- and s.create_time <= #{endTime}
+ and create_at <= #{endTime}
- group by s.member_id
- ) AS subquery;
+ group by member_id
+ )a