REM:
1. 修改删除节点入参字段的判断
This commit is contained in:
chenlinghy 2020-06-08 17:55:40 +08:00
parent d26b0db93d
commit 941be7d19a
1 changed files with 2 additions and 3 deletions

View File

@ -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);
}