平台数据

This commit is contained in:
2025-08-08 17:28:32 +08:00
parent d33aec9d4b
commit 5202ec3be1
3 changed files with 37 additions and 7 deletions

View File

@@ -10,7 +10,10 @@
select ifnull(sum(pay_price),0) as payPrice
from `order`
where
(status = 1 or status = 2) and scenic_id = #{scenicId}
(status = 1 or status = 2)
<if test="scenicId != null">
and scenic_id = #{scenicId}
</if>
<if test="startTime!= null">
and pay_at >= #{startTime}
</if>
@@ -95,7 +98,10 @@
FROM (
select count(1) as count
from statistics
where type=4 and scenic_id = #{scenicId}
where type=4
<if test="scenicId != null">
and scenic_id = #{scenicId}
</if>
<if test="startTime!= null">
and create_time >= #{startTime}
</if>
@@ -111,7 +117,10 @@
FROM (
select count(1) as count
from statistics
where type=3 and scenic_id = #{scenicId}
where type=3
<if test="scenicId != null">
and scenic_id = #{scenicId}
</if>
<if test="startTime!= null">
and create_time >= #{startTime}
</if>
@@ -275,7 +284,10 @@
select ifnull(sum(pay_price),0) as payPrice
from `order`
where
refund_status = 1 and scenic_id = #{scenicId}
refund_status = 1
<if test="scenicId != null">
and scenic_id = #{scenicId}
</if>
<if test="startTime!= null">
and create_at >= #{startTime}
</if>
@@ -315,8 +327,10 @@
<select id="listStatByScenic" resultType="com.ycwl.basic.model.mobile.statistic.resp.AppStatisticsFunnelVO">
SELECT cs1 AS cameraShotOfMemberNum, v1 AS totalVisitorOfMemberNum, sv1 AS scanCodeVisitorOfMemberNum, u1 AS uploadFaceOfMemberNum, m1 AS pushOfMemberNum, gv1 AS completeVideoOfMemberNum, gv2 AS completeOfVideoNum, pv1 AS previewVideoOfMemberNum, pv2 AS previewOfVideoNum, cp1 AS clickOnPayOfMemberNum, o1 AS payOfMemberNum, o2 AS payOfOrderNum, o3 AS payOfOrderAmount, ro2 AS refundOfOrderNum, ro3 AS refundOfOrderAmount
FROM scenic_stats
WHERE scenic_id = #{scenicId}
AND date BETWEEN #{startTime} AND #{endTime}
WHERE date BETWEEN #{startTime} AND #{endTime}
<if test="scenicId != null">
AND scenic_id = #{scenicId}
</if>
</select>
<select id="orderChartByDate" resultType="java.util.HashMap">
WITH RECURSIVE date_series AS (