1
13693261870
2024-12-10 7006932fa6e891d7f92088b9f59fa26c290160a6
se-modules/se-system/src/main/resources/mapper/system/IndexMapper.xml
@@ -6,4 +6,43 @@
   <select id="newUserCount" resultType="java.lang.Integer">
      select count(*) from sys_user where create_time >= #{createTime};
   </select>
   <select id="userCountList" resultType="java.util.Map">
      select user_name userName, count(*) count
      from sys_logininfor
      where access_time >= #{createTime}
      group by user_name
      order by count desc
      limit ${amount};
   </select>
   <select id="uvCount" resultType="java.lang.Integer">
      select count(distinct user_name, ipaddr, date_format(access_time, '%Y%m%d')) count
      from sys_logininfor
      where access_time >= #{createTime};
   </select>
   <select id="pvCount" resultType="java.lang.Integer">
      select count(*)
      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-->
   <select id="sysVisitList" resultType="java.util.Map">
      select menu_name "name",
         (select count(*) from sys_oper_log b where b.title = a.menu_name and date(oper_time) = date(now())) "tcount",
         (select count(*) from sys_oper_log b where b.title = a.menu_name and week(oper_time) = week(now())) "wcount"
      from sys_menu a
      where a.mark = 'index' and a.menu_type = 'C'
      order by a.order_num;
   </select>
</mapper>