1
13693261870
2024-12-10 7006932fa6e891d7f92088b9f59fa26c290160a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.se.system.mapper.IndexMapper">
    <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>