From 5abbb114d703b40d2a42e9e3eecdadcb6d341dcf Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期一, 29 四月 2024 03:51:11 +0800
Subject: [PATCH] 修复keepalive地址
---
service/nvcs.go | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/service/nvcs.go b/service/nvcs.go
index 455b7c8..b2e9124 100644
--- a/service/nvcs.go
+++ b/service/nvcs.go
@@ -91,15 +91,19 @@
}
elevator := data.Elevator[0]
- elevator.Name = strings.Trim(elevator.Name, " ")
- if elevator.Name == "" {
- continue
+
+ // 绋嬪簭閮ㄧ讲鍦ㄨ澶囩, 瀛楃鍙犲姞鍣ㄤ笂鎶ョ殑鍚嶇О鍏佽涓虹┖. 鍦ㄤ簯绔�, 鍚嶇О蹇呴』涓庢憚鍍忔満鐩稿悓
+ if !config.ClientConf.Enable {
+ elevator.Name = strings.Trim(elevator.Name, " ")
+ if elevator.Name == "" {
+ continue
+ }
}
var d = models.Device{
- Id: elevator.Name,
- Pos: elevator.Status.FloorName,
- Ip: elevator.IP,
+ Id: elevator.Name,
+ Floor: elevator.Status.FloorName,
+ Ip: elevator.IP,
}
err = d.Upsert()
--
Gitblit v1.8.0