|
@@ -221,6 +221,90 @@
|
|
|
SELECT * from (SELECT industry,COUNT(*) as cc from ly_enterprise_info where del_flag=0 GROUP BY industry)c ORDER BY cc desc
|
|
|
</select>
|
|
|
|
|
|
+<!-- 某一天的活跃游客-->
|
|
|
+ <select id="getInfoStatistics_Login1" resultType="integer">
|
|
|
+ SELECT
|
|
|
+ COUNT(*) AS todayc
|
|
|
+ FROM
|
|
|
+ ( SELECT remote_addr FROM sys_login_log
|
|
|
+ WHERE type = 1 AND title='首页访问' and create_by is null AND DATE( create_date ) = #{date}
|
|
|
+ GROUP BY remote_addr ) c;
|
|
|
+ </select>
|
|
|
+
|
|
|
+<!--某一天的活跃用户(不含游客),企业用户,挂钩干部,办理部门,大走访办公室,系统管理员-->
|
|
|
+ <select id="getInfoStatistics_Login2" resultType="map">
|
|
|
+ SELECT
|
|
|
+ IFNULL(sum(IF(true,1,0)),0) as 'allcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='38a14f1f42ed424eab4cb5d489596b0d',1,0)),0) as 'qycount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1915280292672946177',1,0)),0) as 'gggbcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1910175949166673921',1,0)),0) as 'blbmcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1910175386924417025',1,0)),0) as 'dzfbgscount',
|
|
|
+ IFNULL(sum(IF(b.role_id='17bac1f980264e3e8193bc965538e2c6',1,0)),0) as 'admincount'
|
|
|
+ FROM
|
|
|
+ ( SELECT create_by FROM sys_login_log
|
|
|
+ WHERE type = 1 AND title='首页访问' and create_by is not null AND DATE( create_date ) = #{date}
|
|
|
+ GROUP BY create_by ) c
|
|
|
+ left join sys_user_role b on c.create_by=b. user_id
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 某月的活跃游客-->
|
|
|
+ <select id="getInfoStatistics_Login3" resultType="integer">
|
|
|
+ SELECT
|
|
|
+ COUNT(*) AS todayc
|
|
|
+ FROM
|
|
|
+ ( SELECT remote_addr FROM sys_login_log
|
|
|
+ WHERE type = 1 AND title='首页访问' and create_by is null AND MONTH( create_date ) = MONTH( #{date}) AND YEAR( create_date ) = YEAR( #{date})
|
|
|
+ GROUP BY remote_addr ) c;
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--某月的活跃用户(不含游客),企业用户,挂钩干部,办理部门,大走访办公室,系统管理员-->
|
|
|
+ <select id="getInfoStatistics_Login4" resultType="map">
|
|
|
+ SELECT
|
|
|
+ IFNULL(sum(IF(true,1,0)),0) as 'allcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='38a14f1f42ed424eab4cb5d489596b0d',1,0)),0) as 'qycount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1915280292672946177',1,0)),0) as 'gggbcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1910175949166673921',1,0)),0) as 'blbmcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1910175386924417025',1,0)),0) as 'dzfbgscount',
|
|
|
+ IFNULL(sum(IF(b.role_id='17bac1f980264e3e8193bc965538e2c6',1,0)),0) as 'admincount'
|
|
|
+ FROM
|
|
|
+ ( SELECT create_by FROM sys_login_log
|
|
|
+ WHERE type = 1 AND title='首页访问' and create_by is not null AND MONTH( create_date ) = MONTH(#{date}) AND YEAR( create_date ) = YEAR(#{date})
|
|
|
+ GROUP BY create_by ) c
|
|
|
+ left join sys_user_role b on c.create_by=b. user_id
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 截止到某天的活跃游客-->
|
|
|
+ <select id="getInfoStatistics_Login5" resultType="integer">
|
|
|
+ SELECT
|
|
|
+ COUNT(*) AS todayc
|
|
|
+ FROM
|
|
|
+ ( SELECT remote_addr FROM sys_login_log
|
|
|
+ WHERE type = 1 AND title='首页访问' and create_by is null AND create_date <= #{date}
|
|
|
+ GROUP BY remote_addr ) c;
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--截止到某天的活跃用户(不含游客),企业用户,走访服务企业用户,挂钩干部,办理部门,大走访办公室,系统管理员-->
|
|
|
+ <select id="getInfoStatistics_Login6" resultType="map">
|
|
|
+ SELECT
|
|
|
+ IFNULL(sum(IF(true,1,0)),0) as 'allcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='38a14f1f42ed424eab4cb5d489596b0d',1,0)),0) as 'qycount',
|
|
|
+ IFNULL(sum(IF(b.role_id='38a14f1f42ed424eab4cb5d489596b0d' and e.des14 is not null,1,0)),0) as 'zfqycount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1915280292672946177',1,0)),0) as 'gggbcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1910175949166673921',1,0)),0) as 'blbmcount',
|
|
|
+ IFNULL(sum(IF(b.role_id='1910175386924417025',1,0)),0) as 'dzfbgscount',
|
|
|
+ IFNULL(sum(IF(b.role_id='17bac1f980264e3e8193bc965538e2c6',1,0)),0) as 'admincount'
|
|
|
+
|
|
|
+ FROM
|
|
|
+ ( SELECT create_by FROM sys_login_log
|
|
|
+ WHERE type = 1 AND title='首页访问' and create_by is not null and create_date <= #{date}
|
|
|
+ GROUP BY create_by ) c
|
|
|
+ left join sys_user_role b on c.create_by=b. user_id
|
|
|
+ left join sys_user d on c.create_by=d.id
|
|
|
+ left join ly_enterprise_info e on e.phone=d.login_name
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
<select id="getAreaList" resultType="map">
|
|
|
SELECT des1 FROM `ly_enterprise_info` where del_flag=0 group By des1
|
|
|
</select>
|