统计:统计点击支付问题,统计今天支付金额问题

This commit is contained in:
2025-07-22 14:37:59 +08:00
parent 4f0d1813c9
commit 1dc9e16c55
2 changed files with 15 additions and 9 deletions

View File

@@ -279,6 +279,9 @@ public class GoodsServiceImpl implements GoodsService {
}
}
TaskEntity task = videoTaskRepository.getTaskById(videoRespVO.getTaskId());
if (task == null) {
return ApiResponse.fail("该vlog不存在或已失效");
}
JSONObject paramJson = JSON.parseObject(task.getTaskParams());
AtomicInteger deviceCount = new AtomicInteger();
goodsDetailVO.setShotTime(taskTaskService.getTaskShotDate(task.getId()));

View File

@@ -12,10 +12,10 @@
where
(status = 1 or status = 2) and scenic_id = #{scenicId}
<if test="startTime!= null">
and create_at >= #{startTime}
and pay_at >= #{startTime}
</if>
<if test="endTime!= null">
and create_at &lt;= #{endTime}
and pay_at &lt;= #{endTime}
</if>
</select>
<select id="countPreviewVideoOfMember" resultType="java.lang.Integer">
@@ -61,17 +61,20 @@
SELECT
IFNULL(count(1), 0) AS count
FROM (
select count(1) as count
from `order`
where 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 = 'CLICK'
and identifier = 'BUY'
<if test="startTime!= null">
and create_at >= #{startTime}
and s.create_time >= #{startTime}
</if>
<if test="endTime!= null">
and create_at &lt;= #{endTime}
and s.create_time &lt;= #{endTime}
</if>
group by member_id
)a
group by s.member_id
) AS subquery;
</select>
<select id="countPayOfMember" resultType="java.lang.Integer">
SELECT