优化服务器列表查询速度、筛选条件bug修复。

ipv4、ipv6初始流量处理。
增加日志排查收益未自动生成问题。
This commit is contained in:
gaoyutao
2025-12-10 18:32:07 +08:00
parent 13e51c11e1
commit 2eaf62ea82
12 changed files with 299 additions and 298 deletions
@@ -194,6 +194,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
NOW()
)
</foreach>
ON DUPLICATE KEY UPDATE
device_sn = CASE
WHEN device_sn != VALUES(device_sn) OR (device_sn IS NULL AND VALUES(device_sn) IS NOT NULL)
THEN VALUES(device_sn)
ELSE device_sn
END,
node_name = CASE
WHEN node_name != VALUES(node_name) OR (node_name IS NULL AND VALUES(node_name) IS NOT NULL)
THEN VALUES(node_name)
ELSE node_name
END,
business_code = CASE
WHEN business_code != VALUES(business_code) OR (business_code IS NULL AND VALUES(business_code) IS NOT NULL)
THEN VALUES(business_code)
ELSE business_code
END,
business_name = CASE
WHEN business_name != VALUES(business_name) OR (business_name IS NULL AND VALUES(business_name) IS NOT NULL)
THEN VALUES(business_name)
ELSE business_name
END,
switch_name = CASE
WHEN switch_name != VALUES(switch_name) OR (switch_name IS NULL AND VALUES(switch_name) IS NOT NULL)
THEN VALUES(switch_name)
ELSE switch_name
END,
interface_device_type = CASE
WHEN interface_device_type != VALUES(interface_device_type) OR (interface_device_type IS NULL AND VALUES(interface_device_type) IS NOT NULL)
THEN VALUES(interface_device_type)
ELSE interface_device_type
END,
server_port = CASE
WHEN server_port != VALUES(server_port) OR (server_port IS NULL AND VALUES(server_port) IS NOT NULL)
THEN VALUES(server_port)
ELSE server_port
END,
switch_sn = CASE
WHEN switch_sn != VALUES(switch_sn) OR (switch_sn IS NULL AND VALUES(switch_sn) IS NOT NULL)
THEN VALUES(switch_sn)
ELSE switch_sn
END,
switch_ip = CASE
WHEN switch_ip != VALUES(switch_ip) OR (switch_ip IS NULL AND VALUES(switch_ip) IS NOT NULL)
THEN VALUES(switch_ip)
ELSE switch_ip
END,
update_time = CASE
WHEN device_sn != VALUES(device_sn) OR (device_sn IS NULL AND VALUES(device_sn) IS NOT NULL)
OR node_name != VALUES(node_name) OR (node_name IS NULL AND VALUES(node_name) IS NOT NULL)
OR business_code != VALUES(business_code) OR (business_code IS NULL AND VALUES(business_code) IS NOT NULL)
OR business_name != VALUES(business_name) OR (business_name IS NULL AND VALUES(business_name) IS NOT NULL)
OR switch_name != VALUES(switch_name) OR (switch_name IS NULL AND VALUES(switch_name) IS NOT NULL)
OR interface_device_type != VALUES(interface_device_type) OR (interface_device_type IS NULL AND VALUES(interface_device_type) IS NOT NULL)
OR server_port != VALUES(server_port) OR (server_port IS NULL AND VALUES(server_port) IS NOT NULL)
OR switch_sn != VALUES(switch_sn) OR (switch_sn IS NULL AND VALUES(switch_sn) IS NOT NULL)
OR switch_ip != VALUES(switch_ip) OR (switch_ip IS NULL AND VALUES(switch_ip) IS NOT NULL)
THEN NOW()
ELSE update_time
END
</insert>
<select id="getAllDeviceSn" parameterType="AllInterfaceName" resultType="AllInterfaceName">