zhangqian
2023-11-13 6cd990b24911fadb9b7304e62317d83b2e6306a6
调整设备id取值优先级,conf.Conf.System.DeviceId优先级比serf配置高
1个文件已修改
6 ■■■■ 已修改文件
service/device.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/device.go
@@ -58,10 +58,10 @@
    }
    if len(deviceList) >= 0 {
        conf.Conf.CurrentDeviceID = deviceList[0]
    } else if ServerID != "" {
        conf.Conf.CurrentDeviceID = ServerID
    } else {
    } else if conf.Conf.System.DeviceId != "" {
        conf.Conf.CurrentDeviceID = conf.Conf.System.DeviceId
    } else {
        conf.Conf.CurrentDeviceID = ServerID
    }
    SetDeviceIDToFile(conf.Conf.CurrentDeviceID)
    return nil