controller/systemCtl.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
models/device.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
controller/systemCtl.go
@@ -63,6 +63,7 @@ return } // 上报设备信息 var d = models.Device{ Id: req.KeepaliveObject.DeviceID, } models/device.go
@@ -43,8 +43,13 @@ } } else { // 记录存在,更新现有记录 if d.Pos == "" || d.Ip == "" { return nil } existingDevice.Pos = d.Pos existingDevice.Ip = d.Ip db.Save(&existingDevice) }