diff --git a/src/main/java/com/dispose/controller/DisposeNodeManagerController.java b/src/main/java/com/dispose/controller/DisposeNodeManagerController.java index 5317223e..d6ef7831 100644 --- a/src/main/java/com/dispose/controller/DisposeNodeManagerController.java +++ b/src/main/java/com/dispose/controller/DisposeNodeManagerController.java @@ -144,13 +144,12 @@ public class DisposeNodeManagerController { IDArrayReq reqInfo = mr.getRequestObject(IDArrayReq.class); - if (reqInfo.getId() == null || Arrays.stream(reqInfo.getId()).anyMatch(Objects::isNull)) { + if (reqInfo.getId() == null) { log.error("Request params error, error:{}", mr.getMsgContent()); return ProtocolRespDTO.result(ErrorCode.ERR_PARAMS); } - if (reqInfo.getId().length > 1 - || Arrays.stream(reqInfo.getId()).anyMatch(v -> v.length() == 0)) { + if (reqInfo.getId()[0].length() == 0) { log.error("Prohibit deleting multiple devices at the same time"); return ProtocolRespDTO.result(ErrorCode.ERR_REMOVEMORE); }