You've already forked FrameTour-BE
统计
This commit is contained in:
@ -25,9 +25,9 @@
|
|||||||
select count(1) as count
|
select count(1) as count
|
||||||
FROM `t_stats_record` r
|
FROM `t_stats_record` r
|
||||||
left join `t_stats` s on r.trace_id=s.trace_id
|
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})
|
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
||||||
and action = "LOAD"
|
and action = 'LOAD'
|
||||||
and identifier = "pages/videoSynthesis/buy"
|
and identifier = 'pages/videoSynthesis/buy'
|
||||||
and JSON_EXTRACT(`params`, '$.share') is null
|
and JSON_EXTRACT(`params`, '$.share') is null
|
||||||
<if test="startTime!= null">
|
<if test="startTime!= null">
|
||||||
and r.create_time >= #{startTime}
|
and r.create_time >= #{startTime}
|
||||||
@ -45,8 +45,8 @@
|
|||||||
select 1
|
select 1
|
||||||
FROM `t_stats_record` r
|
FROM `t_stats_record` r
|
||||||
left join `t_stats` s on r.trace_id=s.trace_id
|
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})
|
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
||||||
and action = "LAUNCH"
|
and action = 'LAUNCH'
|
||||||
and JSON_EXTRACT(`params`, '$.scene') in (1047,1048,1049)
|
and JSON_EXTRACT(`params`, '$.scene') in (1047,1048,1049)
|
||||||
<if test="startTime!= null">
|
<if test="startTime!= null">
|
||||||
and s.create_time >= #{startTime}
|
and s.create_time >= #{startTime}
|
||||||
@ -128,8 +128,8 @@
|
|||||||
select count(1) as count
|
select count(1) as count
|
||||||
FROM `t_stats_record` r
|
FROM `t_stats_record` r
|
||||||
left join `t_stats` s on r.trace_id=s.trace_id
|
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})
|
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
||||||
and action = "PERM_REQ" and identifier = "NOTIFY"
|
and action = 'PERM_REQ' and identifier = 'NOTIFY'
|
||||||
<if test="startTime!= null">
|
<if test="startTime!= null">
|
||||||
and r.create_time >= #{startTime}
|
and r.create_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
@ -153,30 +153,40 @@
|
|||||||
<select id="countUploadFaceOfMember" resultType="java.lang.Integer">
|
<select id="countUploadFaceOfMember" resultType="java.lang.Integer">
|
||||||
select ifnull(count(1),0) as count
|
select ifnull(count(1),0) as count
|
||||||
from(
|
from(
|
||||||
select count(1) as count
|
select 1 as count
|
||||||
from face
|
from t_stats_record r
|
||||||
where scenic_id = #{scenicId}
|
left join `t_stats` s on r.trace_id=s.trace_id
|
||||||
<if test="startTime!= null">and create_at >= #{startTime}</if>
|
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
||||||
<if test="endTime!= null">and create_at <= #{endTime}</if>
|
and r.action = 'FACE_UPLOAD'
|
||||||
group by member_id
|
<if test="startTime!= null">
|
||||||
|
and s.create_time >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime!= null">
|
||||||
|
and s.create_time <= #{endTime}
|
||||||
|
</if>
|
||||||
|
group by s.member_id
|
||||||
) a
|
) a
|
||||||
</select>
|
</select>
|
||||||
<select id="countCompleteVideoOfMember" resultType="java.lang.Integer">
|
<select id="countCompleteVideoOfMember" resultType="java.lang.Integer">
|
||||||
select ifnull(count(1),0) as count
|
select ifnull(count(1),0) as count
|
||||||
from(
|
from(
|
||||||
select 1
|
select 1 from (
|
||||||
from video v
|
select r.identifier, s.member_id
|
||||||
left join task t on v.task_id = t.id
|
from t_stats_record r
|
||||||
left join face f on f.id = t.face_id
|
left join `t_stats` s on r.trace_id=s.trace_id
|
||||||
where f.scenic_id = #{scenicId}
|
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
||||||
<if test="startTime!= null">
|
and r.action = 'FACE_UPLOAD'
|
||||||
and v.create_time >= #{startTime}
|
<if test="startTime!= null">
|
||||||
</if>
|
and s.create_time >= #{startTime}
|
||||||
<if test="endTime!= null">
|
</if>
|
||||||
and v.create_time <= #{endTime}
|
<if test="endTime!= null">
|
||||||
</if>
|
and s.create_time <= #{endTime}
|
||||||
group by f.member_id
|
</if>
|
||||||
)a
|
GROUP BY r.identifier, s.member_id
|
||||||
|
) stat left join task on task.face_id = stat.identifier and task.`status` = 1
|
||||||
|
where task.id is not null
|
||||||
|
group by stat.member_id
|
||||||
|
) a
|
||||||
</select>
|
</select>
|
||||||
<select id="countTotalVisitorOfMember" resultType="java.lang.Integer">
|
<select id="countTotalVisitorOfMember" resultType="java.lang.Integer">
|
||||||
SELECT
|
SELECT
|
||||||
@ -185,7 +195,7 @@
|
|||||||
select 1
|
select 1
|
||||||
FROM `t_stats_record` r
|
FROM `t_stats_record` r
|
||||||
left join `t_stats` s on r.trace_id=s.trace_id
|
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})
|
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
||||||
and action = "LAUNCH"
|
and action = "LAUNCH"
|
||||||
<if test="startTime!= null">
|
<if test="startTime!= null">
|
||||||
and s.create_time >= #{startTime}
|
and s.create_time >= #{startTime}
|
||||||
@ -197,25 +207,37 @@
|
|||||||
) AS subquery;
|
) AS subquery;
|
||||||
</select>
|
</select>
|
||||||
<select id="countCompleteOfVideo" resultType="java.lang.Integer">
|
<select id="countCompleteOfVideo" resultType="java.lang.Integer">
|
||||||
select count(1) as count
|
select ifnull(count(1),0) as count
|
||||||
from video
|
from(
|
||||||
where scenic_id = #{scenicId}
|
select 1 from (
|
||||||
|
select r.identifier, s.member_id
|
||||||
|
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 r.action = 'FACE_UPLOAD'
|
||||||
<if test="startTime!= null">
|
<if test="startTime!= null">
|
||||||
and create_time >= #{startTime}
|
and s.create_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime!= null">
|
<if test="endTime!= null">
|
||||||
and create_time <= #{endTime}
|
and s.create_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY r.identifier, s.member_id
|
||||||
|
) stat left join task on task.face_id = stat.identifier and task.`status` = 1
|
||||||
|
where task.id is not null
|
||||||
|
) a
|
||||||
</select>
|
</select>
|
||||||
<select id="countPreviewOfVideo" resultType="java.lang.Integer">
|
<select id="countPreviewOfVideo" resultType="java.lang.Integer">
|
||||||
SELECT
|
SELECT
|
||||||
IFNULL(SUM(count), 0) AS count
|
IFNULL(SUM(count), 0) AS count
|
||||||
FROM (
|
FROM (
|
||||||
select count(1) as count
|
select 1 as count
|
||||||
FROM `t_stats_record` r
|
FROM `t_stats_record` r
|
||||||
left join `t_stats` s on r.trace_id=s.trace_id
|
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})
|
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 action = 'LOAD'
|
||||||
|
and identifier = 'pages/videoSynthesis/buy'
|
||||||
|
and JSON_EXTRACT(`params`, '$.id') is not null
|
||||||
|
and JSON_EXTRACT(`params`, '$.share') is null
|
||||||
<if test="startTime!= null">
|
<if test="startTime!= null">
|
||||||
and s.create_time >= #{startTime}
|
and s.create_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
|
Reference in New Issue
Block a user