统计换回

This commit is contained in:
2025-07-27 19:56:49 +08:00
parent 136445802d
commit 79906fbdef

View File

@@ -61,20 +61,17 @@
SELECT SELECT
IFNULL(count(1), 0) AS count IFNULL(count(1), 0) AS count
FROM ( FROM (
select 1 select count(1) as count
FROM `t_stats_record` r from `order`
left join `t_stats` s on r.trace_id=s.trace_id where scenic_id = #{scenicId}
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
and action = 'PAYMENT'
and (identifier = 'PAY_REQ' or identifier = 'PAY_BATCH_REQ' or identifier = 'PAY_SOURCE_REQ' or identifier = 'PAY_BATCH_REQ')
<if test="startTime!= null"> <if test="startTime!= null">
and s.create_time >= #{startTime} and create_at >= #{startTime}
</if> </if>
<if test="endTime!= null"> <if test="endTime!= null">
and s.create_time &lt;= #{endTime} and create_at &lt;= #{endTime}
</if> </if>
group by s.member_id group by member_id
) AS subquery; )a
</select> </select>
<select id="countPayOfMember" resultType="java.lang.Integer"> <select id="countPayOfMember" resultType="java.lang.Integer">
SELECT SELECT