#老板的上位机登录
This commit is contained in:
@@ -299,6 +299,12 @@ public class DeviceThreadService {
|
||||
}
|
||||
hostLocationMapper.saveOrUpdate(locationMessage);
|
||||
}
|
||||
Device device = deviceService.selectDeviceBySerialNumber(deviceId);
|
||||
if (device != null) {
|
||||
device.setOnlineStatus(DeviceStatus.offline.getType());
|
||||
device.setUpdateTime(LocalDateTime.now());
|
||||
deviceService.updateDeviceBySelf(device);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (nettyDevice == null) {
|
||||
@@ -322,9 +328,7 @@ public class DeviceThreadService {
|
||||
device.setStatus(3);
|
||||
device.setOnlineStatus(DeviceStatus.online.getType());
|
||||
device.setUpdateTime(LocalDateTime.now());
|
||||
if (!device.isHasHost()) {
|
||||
device.setHasHost(true);
|
||||
}
|
||||
device.setHasHost(true);
|
||||
deviceService.updateDeviceBySelf(device);
|
||||
}
|
||||
// 推送json 找到设备绑定的主机进行推送
|
||||
|
||||
Reference in New Issue
Block a user