统计优化

This commit is contained in:
Jerry Yan 2025-04-07 01:08:17 +08:00
parent cf3a49d590
commit 10e7421672

View File

@ -156,6 +156,13 @@
where scenic_id = #{scenicId} where scenic_id = #{scenicId}
<if test="startTime!= null">and create_at >= #{startTime}</if> <if test="startTime!= null">and create_at >= #{startTime}</if>
<if test="endTime!= null">and create_at &lt;= #{endTime}</if> <if test="endTime!= null">and create_at &lt;= #{endTime}</if>
and member_id in (select member_id from statistics where type = 10
<if test="startTime!= null">
and create_time >= #{startTime}
</if>
<if test="endTime!= null">
and create_time &lt;= #{endTime}
</if>)
group by member_id group by member_id
) a ) a
</select> </select>
@ -172,6 +179,13 @@
<if test="endTime!= null"> <if test="endTime!= null">
and f.create_at &lt;= #{endTime} and f.create_at &lt;= #{endTime}
</if> </if>
and f.member_id in (select member_id from statistics where type = 10
<if test="startTime!= null">
and create_time >= #{startTime}
</if>
<if test="endTime!= null">
and create_time &lt;= #{endTime}
</if>)
group by member_id group by member_id
)a )a
</select> </select>