10.7修正分页查询,小修正

dev
YYD-YY 9 months ago
parent e876808ff7
commit a5f9cdc5ad
  1. 6
      ALOps_sys_backend/alops-admin/src/main/resources/application-druid.yml
  2. 2
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml

@ -6,9 +6,9 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://localhost:3306/alops_sys?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 200515
url: jdbc:mysql://localhost:3306/aiops_sys?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: aiops_sys
password: 1234
# 从库数据源
slave:
# 从数据源开关/默认关闭

@ -210,6 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.gatherTime
FROM (
SELECT
b.id,
b.name,
b.location,
g.cpu_utilization AS cpuUtilization,
@ -221,7 +222,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ROW_NUMBER() OVER (PARTITION BY b.id ORDER BY g.gather_time DESC) AS rn
FROM equ_base b
LEFT JOIN equ_gather g ON b.id = g.equ_id
WHERE g.cpu_utilization IS NOT NULL
) t
WHERE t.rn = 1
ORDER BY t.name

Loading…
Cancel
Save