实现“扫码访问人数、推送订阅人数、预览视频人数统计”

This commit is contained in:
longbinbin
2024-12-12 16:21:52 +08:00
parent ba4c339660
commit ebd01b4247
6 changed files with 164 additions and 6 deletions

View File

@ -17,36 +17,84 @@
select ifnull(count(1),0) as count
from statistics
where type=2 and scenic_id = #{scenicId}
<if test="startTime!= null and startTime!= ''">
and create_time >= #{startTime}
</if>
<if test="endTime!= null and endTime!= ''">
and create_time &lt;= #{endTime}
</if>
group by member_id
</select>
<select id="countScanCodeOfMember" resultType="java.lang.Integer">
select ifnull(count(1),0) as count
from statistics
where type=0 and scenic_id = #{scenicId}
<if test="startTime!= null and startTime!= ''">
and create_time >= #{startTime}
</if>
<if test="endTime!= null and endTime!= ''">
and create_time &lt;= #{endTime}
</if>
group by member_id
</select>
<select id="countClickPayOfMember" resultType="java.lang.Integer">
select ifnull(count(1),0) as count
from statistics
where type=9 and scenic_id = #{scenicId}
<if test="startTime!= null and startTime!= ''">
and create_time >= #{startTime}
</if>
<if test="endTime!= null and endTime!= ''">
and create_time &lt;= #{endTime}
</if>
group by member_id
</select>
<select id="countPayOfMember" resultType="java.lang.Integer">
select ifnull(count(1),0) as count
from statistics
where type in(3,4) and scenic_id = #{scenicId}
<if test="startTime!= null and startTime!= ''">
and create_time >= #{startTime}
</if>
<if test="endTime!= null and endTime!= ''">
and create_time &lt;= #{endTime}
</if>
group by member_id
</select>
<select id="countSceneOrderNum" resultType="java.lang.Integer">
select ifnull(count(1),0) as count
from statistics
where type=3 and scenic_id = #{scenicId}
<if test="startTime!= null and startTime!= ''">
and create_time >= #{startTime}
</if>
<if test="endTime!= null and endTime!= ''">
and create_time &lt;= #{endTime}
</if>
group by morph_id
</select>
<select id="countPushOrderNum" resultType="java.lang.Integer">
select ifnull(count(1),0) as count
from statistics
where type=4 and scenic_id = #{scenicId}
<if test="startTime!= null and startTime!= ''">
and create_time >= #{startTime}
</if>
<if test="endTime!= null and endTime!= ''">
and create_time &lt;= #{endTime}
</if>
group by morph_id
</select>
<select id="countPushOfMember" resultType="java.lang.Integer">
select ifnull(count(1),0) as count
from statistics
where type=6 and scenic_id = #{scenicId}
<if test="startTime!= null and startTime!= ''">
and create_time >= #{startTime}
</if>
<if test="endTime!= null and endTime!= ''">
and create_time &lt;= #{endTime}
</if>
group by member_id
</select>
</mapper>