1、增加磁盘HDD类型已用空间图形接口。

2、增加磁盘HDD类型总空间字段计算。
3、增加硬盘设备监控列表接口。
This commit is contained in:
gaoyutao
2026-01-16 15:10:31 +08:00
parent f39aa887c8
commit d62fe4b99a
16 changed files with 301 additions and 51 deletions
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAllDiskNameList" parameterType="AllDiskName" resultMap="AllDiskNameResult">
<include refid="selectAllDiskNameVo"/>
<where>
<where>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
<if test="name != null and name != ''"> and name = #{name}</if>
<if test="status != null "> and status = #{status}</if>
@@ -126,4 +126,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</foreach>
</insert>
<select id="selectDiskInfoList" parameterType="AllDiskName" resultType="AllDiskName">
SELECT
a.id,
a.client_id as clientId,
a.name,
a.status,
a.read_iops as readIops,
a.write_iops as writeIops,
a.create_time as createTime,
a.update_time as updateTime,
b.serial,
b.total,
b.write_speed as writeSpeed,
b.read_speed as readSpeed,
b.type,
b.used_space as usedSpace
FROM all_disk_name a
LEFT JOIN (
SELECT client_id, name, MAX(create_time) as max_create_time
FROM ${tableName}
GROUP BY client_id, name
) latest ON a.client_id = latest.client_id AND a.name = latest.name
LEFT JOIN ${tableName} b
ON latest.client_id = b.client_id
AND latest.name = b.name
AND latest.max_create_time = b.create_time
<where>
<if test="clientId != null">
AND a.client_id = #{clientId}
</if>
</where>
</select>
</mapper>