服务器注册接口、snmp采集工具优化、其他bug修复
This commit is contained in:
+15
-1
@@ -130,8 +130,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select id, `name`, mac, status, `type`, ipV4, in_dropped, out_dropped, in_speed, out_speed,
|
||||
create_time, update_time, create_by, update_by, client_id, duplex, speed
|
||||
from ${tableName}
|
||||
where client_id = #{clientId} and `name` like 'eth0%'
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||
</where>
|
||||
limit 1
|
||||
</select>
|
||||
<select id="getNetTrafficList" parameterType="InitialBandwidthTraffic" resultMap="InitialBandwidthTrafficResult">
|
||||
select id, `name`, mac, status, `type`, ipV4, in_dropped, out_dropped, in_speed, out_speed,
|
||||
create_time, update_time, create_by, update_by, client_id, duplex, speed
|
||||
from ${tableName}
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialCpuInfo" parameterType="InitialCpuInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_cpu_info
|
||||
insert IGNORE into initial_cpu_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="avg1 != null">avg1,</if>
|
||||
@@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialCpuInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_cpu_info
|
||||
INSERT IGNORE INTO initial_cpu_info
|
||||
(
|
||||
client_id,
|
||||
avg1,
|
||||
|
||||
@@ -30,6 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectInitialDiskInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
@@ -40,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialDiskInfo" parameterType="InitialDiskInfo">
|
||||
insert into initial_disk_info
|
||||
insert IGNORE into initial_disk_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
@@ -110,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialDiskInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_disk_info
|
||||
INSERT IGNORE INTO initial_disk_info
|
||||
(
|
||||
id,
|
||||
client_id,
|
||||
@@ -168,4 +170,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where client_id = #{clientId} and `name`= #{name}
|
||||
limit 1
|
||||
</select>
|
||||
<select id="getAllDistName" parameterType="String" resultType="java.util.Map">
|
||||
select name from initial_disk_info
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
group by name
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -28,6 +28,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectInitialDockerInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
@@ -38,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialDockerInfo" parameterType="InitialDockerInfo" useGeneratedKeys="true" keyProperty="auto_id">
|
||||
insert into initial_docker_info
|
||||
insert IGNORE into initial_docker_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
@@ -100,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialDockerInfo" parameterType="java.util.List">
|
||||
INSERT INTO initial_docker_info
|
||||
INSERT IGNORE INTO initial_docker_info
|
||||
(
|
||||
`id`,
|
||||
`name`,
|
||||
@@ -150,6 +152,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="getDockerDetailsMsg" parameterType="InitialDockerInfo" resultMap="InitialDockerInfoResult">
|
||||
<include refid="selectInitialDockerInfoVo"/>
|
||||
where client_id = #{clientId} and `name` = #{name}
|
||||
where client_id = #{clientId} and `id` = #{id}
|
||||
</select>
|
||||
<select id="getAllDockerId" parameterType="String" resultType="java.util.Map">
|
||||
select id from initial_docker_info
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
group by id
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -27,6 +27,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectInitialMemoryInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
@@ -37,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialMemoryInfo" parameterType="InitialMemoryInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_memory_info
|
||||
insert IGNORE into initial_memory_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="swapSizeFree != null">swap_size_free,</if>
|
||||
@@ -96,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialMemoryInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_memory_info
|
||||
INSERT IGNORE INTO initial_memory_info
|
||||
(
|
||||
client_id,
|
||||
swap_size_free,
|
||||
|
||||
@@ -26,6 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectInitialMountPointInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
@@ -36,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialMountPointInfo" parameterType="InitialMountPointInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_mount_point_info
|
||||
insert IGNORE into initial_mount_point_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="mount != null and mount != ''">mount,</if>
|
||||
@@ -92,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialMountPointInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_mount_point_info
|
||||
INSERT IGNORE INTO initial_mount_point_info
|
||||
(
|
||||
client_id,
|
||||
mount,
|
||||
@@ -138,7 +140,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="pointDetailsMsg" parameterType="String" resultMap="InitialMountPointInfoResult">
|
||||
<include refid="selectInitialMountPointInfoVo"/>
|
||||
where client_id = #{clientId} and mount='/'
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="mount != null and mount != ''"> and mount = #{mount}</if>
|
||||
</where>
|
||||
limit 1
|
||||
</select>
|
||||
<select id="getAllMountName" parameterType="String" resultType="java.util.Map">
|
||||
select mount from initial_mount_point_info
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
group by mount
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -49,6 +49,8 @@
|
||||
<if test="ifOutDiscards != null "> and if_out_discards = #{ifOutDiscards}</if>
|
||||
<if test="ifInErrors != null "> and if_in_errors = #{ifInErrors}</if>
|
||||
<if test="ifOutErrors != null "> and if_out_errors = #{ifOutErrors}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user