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