增加登录器客户端心跳
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
-- 为设备表添加心跳时间字段,用于实时判断设备是否在线
|
||||
-- 在线判断逻辑:last_heartbeat_at 在 5 分钟以内 = 在线,否则 = 离线
|
||||
ALTER TABLE `yz_platform_cursor_equipment`
|
||||
ADD COLUMN `last_heartbeat_at` DATETIME NULL DEFAULT NULL COMMENT '最后心跳时间(客户端定期上报)' AFTER `update_time`;
|
||||
|
||||
-- 可选:加索引,便于管理后台统计在线设备数
|
||||
ALTER TABLE `yz_platform_cursor_equipment`
|
||||
ADD INDEX `idx_last_heartbeat_at` (`last_heartbeat_at`);
|
||||
Reference in New Issue
Block a user