| | |
| | | |
| | | // ⑥常用系统展示/各系统访问信息:基于用户访问次数排名,展示前五个系统的排名 |
| | | // 并展示各个系统一天内、三天内、一周内的访问次数。【可考虑按其他指标进行排名展示】 |
| | | @Log(title = "用户统计排行", businessType = BusinessType.OTHER) |
| | | @Log(title = "常用系统展示", businessType = BusinessType.OTHER) |
| | | @GetMapping("/sysVisitList") |
| | | public Map<String, Object> sysVisitList() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | public List<Map<String, Object>> sysVisitList(Integer day, Integer amount) { |
| | | if (null == day || day < 1) day = 15; |
| | | if (day > 365) day = 365; |
| | | if (null == amount) amount = 5; |
| | | if (amount > 100) amount = 100; |
| | | |
| | | return map; |
| | | return indexService.sysVisitList(day, amount); |
| | | } |
| | | |
| | | @Log(title = "运维监控", businessType = BusinessType.OTHER) |
| | |
| | | @Repository |
| | | @SuppressWarnings("ALL") |
| | | public interface IndexMapper { |
| | | public int newUserCount(@Param("createTime") String createTime); |
| | | int newUserCount(@Param("createTime") String createTime); |
| | | |
| | | //@MapKey("username") |
| | | public List<Map<String, Object>> userCountList(@Param("createTime") String createTime, @Param("amount") Integer amount); |
| | | List<Map<String, Object>> userCountList(@Param("createTime") String createTime, @Param("amount") Integer amount); |
| | | |
| | | public int uvCount(@Param("createTime") String createTime); |
| | | int uvCount(@Param("createTime") String createTime); |
| | | |
| | | public int pvCount(String createTime); |
| | | int pvCount(@Param("createTime") String createTime); |
| | | |
| | | List<Map<String, Object>> sysVisitList(@Param("createTime") String createTime, @Param("amount") Integer amount); |
| | | } |
| | |
| | | |
| | | return indexMapper.pvCount(createTime); |
| | | } |
| | | |
| | | public List<Map<String, Object>> sysVisitList(Integer day, Integer amount) { |
| | | String createTime = getCreateTime(day); |
| | | |
| | | return indexMapper.sysVisitList(createTime, amount); |
| | | } |
| | | } |
| | |
| | | from sys_oper_log |
| | | where oper_url = '/index/addAccessLog' and oper_time >= #{createTime}; |
| | | </select> |
| | | |
| | | <select id="sysVisitList" resultType="java.util.Map"> |
| | | select title, count(*) count |
| | | from sys_oper_log |
| | | where oper_time >= #{createTime} and (title like '%平台' or title like '%分系统' or title like '%研讨厅' or title = '装备库') |
| | | group by title |
| | | order by count desc |
| | | limit ${amount}; |
| | | </select> |
| | | </mapper> |