Commit 85b4033f by “Kongxiangkun”

增加面板排行榜接口

parent 57415bae
...@@ -381,13 +381,13 @@ ...@@ -381,13 +381,13 @@
select dept_name as name, count(*) as num 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') = #{dateString}
</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}
</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}
</if> </if>
group by dept_name order by num desc limit 5 group by dept_name order by num desc limit 5
</select> </select>
...@@ -397,13 +397,13 @@ ...@@ -397,13 +397,13 @@
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(*) 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') = #{dateString}
</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}
</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}
</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 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>
......
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