This commit is contained in:
2026-04-24 10:31:41 +08:00
parent cfeb53932b
commit 5afb8233d5
27 changed files with 753 additions and 939 deletions

View File

@@ -368,11 +368,17 @@ public class TransferDeviceService {
String platform = bindDTO.getPlatform();
String userName = user.getUsername();
String masterId = userName + ":" + platform;
Integer type = bindDTO.getType();
NettyDevice deviceMaster = sessionManager.getDevice(masterId);
if (deviceMaster != null) {
sysUserClientService.updateAliveStatus(masterId, "", 0);
deviceMaster.setCurrentSlaveId(null);
deviceMaster.getConnectedConnectors().clear();
if (deviceMaster != null && type!=null) {
if(type == 1){
sysUserClientService.updateAliveStatus(masterId, "", 0);
deviceMaster.setCurrentSlaveId(null);
deviceMaster.getConnectedConnectors().clear();
} else if (type == 2) {
deviceMaster.setConnectorStatus(ConnectorStatus.RECEIVER);
sysUserClientService.updateAliveStatus(masterId, deviceMaster.getCurrentSlaveId(), 2);
}
}
} catch (Exception e) {
log.error(e.getMessage());