REM:
1. 增加添加设备参数校验
This commit is contained in:
HuangXin 2020-05-12 18:04:44 +08:00
parent 2b561cc9d2
commit 99fdfad37f
2 changed files with 6 additions and 1 deletions

View File

@ -442,7 +442,7 @@ public class DisposeTaskController {
});
}
return ProtocolRespDTO.result(err, rspInfo);
return ProtocolRespDTO.result(err, rspInfo);
}
/**

View File

@ -136,6 +136,11 @@ public class DisposeNodeManagerImpl implements DisposeNodeManager {
public MReturnType<ErrorCode, String> addNewDisposeDevice(DisposeDevice dev) {
DisposeEntryManager dp;
if(dev.getType() == null || dev.getIpAddr() == null || !IPAddrType.isIpAddress(dev.getIpAddr())) {
log.error("Add device error: type {}, ip {}", dev.getType(), dev.getIpAddr());
return new MReturnType<>(ErrorCode.ERR_PARAMEXCEPTION, String.valueOf(-1));
}
try {
// 获取处置设备硬件访问接口
dp = DeviceRouter.deviceRouterFactory(dev.getType(),