Skip to content

Commit

Permalink
fix: 修复由于日志表结构变更引发的仪表盘报错
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Dec 17, 2023
1 parent 9bf0150 commit 8a93ea8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions continew-admin-monitor/src/main/resources/mapper/LogMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<select id="selectDashboardTotal" resultType="top.charles7c.continew.admin.monitor.model.resp.DashboardTotalResp">
SELECT
(SELECT COUNT(*) FROM `sys_log`) AS pvCount,
(SELECT COUNT(DISTINCT `client_ip`) FROM `sys_log`) AS ipCount,
(SELECT COUNT(DISTINCT `ip`) FROM `sys_log`) AS ipCount,
(SELECT COUNT(*) FROM `sys_log` WHERE DATE(`create_time`) = CURDATE()) AS todayPvCount,
(SELECT COUNT(*) FROM `sys_log` WHERE DATE(`create_time`) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)) AS yesterdayPvCount
</select>
Expand All @@ -14,7 +14,7 @@
SELECT
DATE(`create_time`) AS date,
COUNT(*) AS pvCount,
COUNT(DISTINCT `client_ip`) AS ipCount
COUNT(DISTINCT `ip`) AS ipCount
FROM `sys_log`
GROUP BY DATE(`create_time`)
HAVING `date` != CURDATE()
Expand All @@ -38,11 +38,11 @@

<select id="selectListDashboardGeoDistribution" resultType="java.util.Map">
SELECT
`location` AS name,
COUNT(DISTINCT `client_ip`) AS value
`address` AS name,
COUNT(DISTINCT `ip`) AS value
FROM `sys_log`
GROUP BY `location`
ORDER BY COUNT(DISTINCT `client_ip`) DESC
GROUP BY `address`
ORDER BY COUNT(DISTINCT `ip`) DESC
LIMIT 10
</select>
</mapper>

0 comments on commit 8a93ea8

Please sign in to comment.