From 7583c9e22e10a5d900fbbe1ea45d2435d5cd1014 Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Sun, 27 Apr 2025 04:35:32 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/mapper/StatisticsMapper.xml | 133 +++++++++---------
1 file changed, 63 insertions(+), 70 deletions(-)
diff --git a/src/main/resources/mapper/StatisticsMapper.xml b/src/main/resources/mapper/StatisticsMapper.xml
index 6c02f30..5796f90 100644
--- a/src/main/resources/mapper/StatisticsMapper.xml
+++ b/src/main/resources/mapper/StatisticsMapper.xml
@@ -23,23 +23,19 @@
IFNULL(count(1), 0) AS count
FROM (
select count(1) as count
- from statistics
- where type=2 and scenic_id = #{scenicId}
+ 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 = "LOAD"
+ and identifier = "pages/videoSynthesis/buy"
+ and JSON_EXTRACT(`params`, '$.share') is null
- and create_time >= #{startTime}
+ and r.create_time >= #{startTime}
- and create_time <= #{endTime}
+ and r.create_time <= #{endTime}
- and morph_id is not null
- and member_id in (select member_id from statistics where type = 10
-
- and create_time >= #{startTime}
-
-
- and create_time <= #{endTime}
- )
- group by member_id
+ group by s.member_id
)a
@@ -195,17 +181,19 @@
SELECT
IFNULL(count(1), 0) AS count
FROM (
- select count(1) as count
- from statistics
- where type in (10) and scenic_id = #{scenicId}
+ 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 = "LAUNCH"
- and create_time >= #{startTime}
+ and s.create_time >= #{startTime}
- and create_time <= #{endTime}
+ and s.create_time <= #{endTime}
- group by member_id
- ) AS a;
+ group by s.member_id
+ ) AS subquery;
\ No newline at end of file