统计优化
This commit is contained in:
parent
cf3a49d590
commit
10e7421672
@ -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 <= #{endTime}</if>
|
<if test="endTime!= null">and create_at <= #{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 <= #{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 <= #{endTime}
|
and f.create_at <= #{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 <= #{endTime}
|
||||||
|
</if>)
|
||||||
group by member_id
|
group by member_id
|
||||||
)a
|
)a
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user