REM:
1. 删除重复字段判空的代码
This commit is contained in:
chenlinghy 2020-06-08 17:20:14 +08:00
parent 3db15e1615
commit d26b0db93d
2 changed files with 4 additions and 5 deletions

View File

@ -178,8 +178,7 @@ public class DisposeTaskController {
IDArrayReq reqInfo = mr.getRequestObject(IDArrayReq.class);
if (reqInfo.getTaskId() == null
|| Arrays.stream(reqInfo.getTaskId()).anyMatch(v -> v.length() == 0)
|| Arrays.stream(reqInfo.getTaskId()).anyMatch(Objects::isNull)) {
|| Arrays.stream(reqInfo.getTaskId()).anyMatch(v -> v.length() == 0)) {
log.error("Request taskId params error, error:{}", mr.getMsgContent());
return ProtocolRespDTO.result(ErrorCode.ERR_PARAMS);
}
@ -486,7 +485,7 @@ public class DisposeTaskController {
GetTaskReq reqInfo = mr.getRequestObject(GetTaskReq.class);
if (reqInfo.getId() == null || Arrays.stream(reqInfo.getId()).anyMatch(Objects::isNull)) {
if (reqInfo.getId() == null) {
log.error("Request id params error, error:{}", mr.getMsgContent());
return ProtocolRespDTO.result(ErrorCode.ERR_PARAMS);
}
@ -585,7 +584,7 @@ public class DisposeTaskController {
IDArrayReq reqInfo = mr.getRequestObject(IDArrayReq.class);
if (reqInfo.getTaskId() == null || Arrays.stream(reqInfo.getTaskId()).anyMatch(Objects::isNull)) {
if (reqInfo.getTaskId() == null) {
log.error("Request taskId params error, error:{}", mr.getMsgContent());
return ProtocolRespDTO.result(ErrorCode.ERR_PARAMS);
}

View File

@ -155,7 +155,7 @@ public class TaskServiceImpl implements TaskService {
ErrorCode err = taskCacheManager.addTask(cacheTask);
log.info("Create new dispose task is running: devId:{}, disposeIp:{}, type:{}, result:{}",
log.info("Create new dispose task: devId:{}, disposeIp:{}, type:{}, result:{}",
task.getDeviceId(), task.getDisposeIp(), task.getType(), err.getMsg());
return MulReturnType.<ErrorCode, Long>builder().firstParam(err).secondParam(task.getId()).build();