Commit 4070d48a by “Kongxiangkun”

修改中台活跃度统计规则

parent fe0cfb81
...@@ -386,17 +386,17 @@ ...@@ -386,17 +386,17 @@
<select id="queryRankListByUser" resultType="com.yizhi.site.application.vo.site.EventTrackRankListVo"> <select id="queryRankListByUser" resultType="com.yizhi.site.application.vo.site.EventTrackRankListVo">
select a.full_name as name, num from ( select a.full_name as name, num from (
select create_by_id as create_by_id, count(*) as num from event_track e where select create_by_id as create_by_id, count(DISTINCT create_by_id,DATE_FORMAT(e.create_time, '%Y-%m-%d')) as num from event_track e where
type in ('9', '13', '16') type in ('9', '13', '16')
<if test="date==3"> <if test="date==3">
and DATE_FORMAT(e.create_time, '%Y-%m-%d') = #{dateString} and DATE_FORMAT(e.create_time, '%Y-%m-%d') = #{dateString} group by create_by_id,DATE_FORMAT(e.create_time, '%Y-%m-%d')
</if> </if>
<if test="date==2"> <if test="date==2">
and DATE_FORMAT(e.create_time, '%Y-%m') = #{dateString} and DATE_FORMAT(e.create_time, '%Y-%m') = #{dateString} group by create_by_id,DATE_FORMAT(e.create_time, '%Y-%m')
</if> </if>
<if test="date==1"> <if test="date==1">
and DATE_FORMAT(e.create_time, '%Y') = #{dateString} and DATE_FORMAT(e.create_time, '%Y') = #{dateString} group by create_by_id,DATE_FORMAT(e.create_time, '%Y')
</if> </if>
group by create_by_id order by num desc limit 5 ) e left join cloud_system.account a on e.create_by_id = a.id order by num desc ) e left join cloud_system.account a on e.create_by_id = a.id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment