OCT
REM: 1. 新增无法处置该IP的错误码,当启动处置任务时设备IP不在范围内返回无法处置该IP,而不是没有该设备
This commit is contained in:
parent
1dadd71895
commit
a5fec56ecc
|
@ -141,6 +141,11 @@ public enum ErrorCode {
|
|||
* Err requesttimeout error code.
|
||||
*/
|
||||
ERR_REQUESTTIMEOUT(32, "请求超时"),
|
||||
|
||||
/**
|
||||
* Err unable to dispose the ip error code.
|
||||
*/
|
||||
ERR_UNABLEDISPOSEIP(33, "无法处置该IP"),
|
||||
;
|
||||
|
||||
private final int errno;
|
||||
|
|
|
@ -112,6 +112,14 @@ public class TaskServiceImpl implements TaskService {
|
|||
// 没有指定处置能力节点的情况
|
||||
if (taskId == null || taskId < 0) {
|
||||
disposeDevice = getDisposeNode(task.getDisposeIp(), task.getType());
|
||||
|
||||
//处置IP不在范围内
|
||||
if(disposeDevice == null){
|
||||
return MulReturnType.<ErrorCode, Long>builder()
|
||||
.firstParam(ErrorCode.ERR_UNABLEDISPOSEIP)
|
||||
.secondParam(-1L)
|
||||
.build();
|
||||
}
|
||||
} else { // 指定了处置能力节点的情况
|
||||
disposeDevice = disposeNodeManager.getDisposeDeviceById(taskId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue