This commit is contained in:
2025-02-12 16:06:23 +08:00
parent 3f493b0d81
commit 9c13d7261c
6 changed files with 65 additions and 43 deletions

View File

@ -38,7 +38,7 @@
SELECT
IFNULL(count(1), 0) AS count
FROM (
select count(1) as count
select 1
from statistics
where type=10 and morph_id in (1047,1048,1049) and scenic_id = #{scenicId}
<if test="startTime!= null">
@ -47,7 +47,6 @@
<if test="endTime!= null">
and create_time &lt;= #{endTime}
</if>
group by member_id
) AS subquery;
</select>
<select id="countClickPayOfMember" resultType="java.lang.Integer">
@ -83,23 +82,28 @@
)a
</select>
<select id="countSceneOrderNum" resultType="java.lang.Integer">
SELECT
IFNULL(count(count), 0) AS count
FROM (
select count(1) as count
from `order`
where scenic_id = #{scenicId} and pay_at is not null
from statistics
where type=4 and scenic_id = #{scenicId}
<if test="startTime!= null">
and create_at >= #{startTime}
and create_time >= #{startTime}
</if>
<if test="endTime!= null">
and create_at &lt;= #{endTime}
and create_time &lt;= #{endTime}
</if>
group by morph_id
)a
</select>
<select id="countPushOrderNum" resultType="java.lang.Integer">
SELECT
IFNULL(SUM(count), 0) AS count
IFNULL(count(count), 0) AS count
FROM (
select count(1) as count
from statistics
where type=4 and scenic_id = #{scenicId}
where type=3 and scenic_id = #{scenicId}
<if test="startTime!= null">
and create_time >= #{startTime}
</if>