Browse Source

Merge pull request #1615 from samz406/1227-queue

queue return info is not correct
pull/2/head
Tboy 5 years ago committed by GitHub
parent
commit
87738af235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/QueueService.java

18
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/QueueService.java

@ -115,12 +115,12 @@ public class QueueService extends BaseService {
} }
if (StringUtils.isEmpty(queue)) { if (StringUtils.isEmpty(queue)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queue); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queue");
return result; return result;
} }
if (StringUtils.isEmpty(queueName)) { if (StringUtils.isEmpty(queueName)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queueName); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queueName");
return result; return result;
} }
@ -163,6 +163,16 @@ public class QueueService extends BaseService {
return result; return result;
} }
if (StringUtils.isEmpty(queue)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queue");
return result;
}
if (StringUtils.isEmpty(queueName)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queueName");
return result;
}
Queue queueObj = queueMapper.selectById(id); Queue queueObj = queueMapper.selectById(id);
if (queueObj == null) { if (queueObj == null) {
putMsg(result, Status.QUEUE_NOT_EXIST, id); putMsg(result, Status.QUEUE_NOT_EXIST, id);
@ -222,12 +232,12 @@ public class QueueService extends BaseService {
Result result = new Result(); Result result = new Result();
if (StringUtils.isEmpty(queue)) { if (StringUtils.isEmpty(queue)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queue); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queue");
return result; return result;
} }
if (StringUtils.isEmpty(queueName)) { if (StringUtils.isEmpty(queueName)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queueName); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queueName");
return result; return result;
} }

Loading…
Cancel
Save