REM:
1. 更是设备能力信息链接状态数据类型
This commit is contained in:
HuangXin 2020-09-14 15:38:05 +08:00
parent 2dc4867721
commit 44cce111d5
4 changed files with 63 additions and 64 deletions

View File

@ -218,8 +218,7 @@ public class DisposeInfoController {
dv.setIpAddr(d.getIpAddr());
dv.setIpPort(Helper.ipPortNormalize(d.getIpPort(), d.getUrlType()));
dv.setOnline(disposeAbilityRouterService.getAbilityDevice(d.getId())
.getDb()
.getDeviceLinkStatus() ? 1 : 0);
.getLinkStatus() ? 1 : 0);
dv.setStatus(ErrorCode.ERR_OK.getCode());
dv.setMessage(new String[]{ErrorCode.ERR_OK.getMsg()});
rspList.add(dv);

View File

@ -36,5 +36,5 @@ public class AbilityInfo {
/**
* The Link status.
*/
private boolean linkStatus;
private Boolean linkStatus;
}

View File

@ -36,7 +36,7 @@ public class DeviceManagerTask {
log.debug("{}{} get link status {}", v.getDev().getIpAddr(),
((v.getDev().getIpPort() == null || v.getDev().getIpPort().length() == 0) ? "" :
":" + v.getDev().getIpPort()),
v.isLinkStatus());
v.getLinkStatus());
});
}

View File

@ -135,7 +135,7 @@ public class DisposeAbilityRouterServiceTest extends InitTestEnvironment {
Assert.assertNotNull(v.getDb());
Assert.assertNotNull(v.getFirewareInfo());
}
Assert.assertTrue(v.isLinkStatus());
Assert.assertTrue(v.getLinkStatus());
});
}
@ -162,7 +162,7 @@ public class DisposeAbilityRouterServiceTest extends InitTestEnvironment {
Assert.assertNotNull(abilityInfo.getDb());
Assert.assertNotNull(abilityInfo.getFirewareInfo());
}
Assert.assertTrue(abilityInfo.isLinkStatus());
Assert.assertTrue(abilityInfo.getLinkStatus());
abilityInfo = disposeAbilityRouterService.getAbilityDevice(v.getId());
@ -173,7 +173,7 @@ public class DisposeAbilityRouterServiceTest extends InitTestEnvironment {
if (abilityInfo.getDev().getDeviceType() != DisposeDeviceType.VIRTUAL_DISPOSE) {
Assert.assertNotNull(abilityInfo.getFirewareInfo());
}
Assert.assertTrue(abilityInfo.isLinkStatus());
Assert.assertTrue(abilityInfo.getLinkStatus());
});
}
@ -264,7 +264,7 @@ public class DisposeAbilityRouterServiceTest extends InitTestEnvironment {
if (abilityInfo.getDev().getDeviceType() != DisposeDeviceType.VIRTUAL_DISPOSE) {
Assert.assertNotNull(abilityInfo.getFirewareInfo());
}
Assert.assertTrue(abilityInfo.isLinkStatus());
Assert.assertTrue(abilityInfo.getLinkStatus());
});
}
@ -285,7 +285,7 @@ public class DisposeAbilityRouterServiceTest extends InitTestEnvironment {
if (abilityInfo.getDev().getDeviceType() == DisposeDeviceType.DPTECH_UMC) {
Assert.assertNotNull(abilityInfo.getFirewareInfo());
Assert.assertTrue(abilityInfo.isLinkStatus());
Assert.assertTrue(abilityInfo.getLinkStatus());
}
});
}