Commit 57415bae by “Kongxiangkun”

增加面板排行榜接口

parent e8d4118f
...@@ -9,6 +9,6 @@ public class EventTrackRankListVo { ...@@ -9,6 +9,6 @@ public class EventTrackRankListVo {
private String name; private String name;
private Integer num; private int num;
} }
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
</select> </select>
<select id="queryRankListByDept" resultType="com.yizhi.site.application.vo.site.EventTrackRankListVo"> <select id="queryRankListByDept" resultType="com.yizhi.site.application.vo.site.EventTrackRankListVo">
select dept_name as name, count(*) as cnt from event_track e where select dept_name as name, count(*) as num from event_track e where
type in ('9', '13') and dept_name is not null type in ('9', '13') and dept_name is not null
<if test="date==3"> <if test="date==3">
and DATE_FORMAT(e.create_time, '%Y-%m-%d') = DATE_SUB(DATE_FORMAT(#{dateString}, '%Y-%m-%d'), INTERVAL 1 DAY) and DATE_FORMAT(e.create_time, '%Y-%m-%d') = DATE_SUB(DATE_FORMAT(#{dateString}, '%Y-%m-%d'), INTERVAL 1 DAY)
...@@ -389,12 +389,12 @@ ...@@ -389,12 +389,12 @@
<if test="date==1"> <if test="date==1">
and DATE_FORMAT(e.create_time, '%Y') = #{dateString} and DATE_FORMAT(e.create_time, '%Y') = #{dateString}
</if> </if>
group by dept_name order by cnt desc limit 5 group by dept_name order by num desc limit 5
</select> </select>
<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, cnt from ( select a.full_name as name, num from (
select create_by_id as create_by_id, count(*) as cnt from event_track e where select create_by_id as create_by_id, count(*) as num from event_track e where
type in ('9', '13') type in ('9', '13')
<if test="date==3"> <if test="date==3">
and DATE_FORMAT(e.create_time, '%Y-%m-%d') = DATE_SUB(DATE_FORMAT(#{dateString}, '%Y-%m-%d'), INTERVAL 1 DAY) and DATE_FORMAT(e.create_time, '%Y-%m-%d') = DATE_SUB(DATE_FORMAT(#{dateString}, '%Y-%m-%d'), INTERVAL 1 DAY)
...@@ -405,6 +405,6 @@ ...@@ -405,6 +405,6 @@
<if test="date==1"> <if test="date==1">
and DATE_FORMAT(e.create_time, '%Y') = #{dateString} and DATE_FORMAT(e.create_time, '%Y') = #{dateString}
</if> </if>
group by create_by_id order by cnt desc limit 5 ) e left join cloud_system.account a on e.create_by_id = a.id 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
</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