From f6fd7f6540742020a1f2147e0cc71600b2c13d1a Mon Sep 17 00:00:00 2001 From: ouyangyewei Date: Mon, 13 Dec 2021 14:22:39 +0800 Subject: [PATCH] return domain after creating success (#7355) Co-authored-by: ouyangyewei --- .../api/service/impl/AccessTokenServiceImpl.java | 1 + .../dolphinscheduler/api/service/impl/ProjectServiceImpl.java | 2 +- .../dolphinscheduler/api/service/impl/QueueServiceImpl.java | 1 + .../dolphinscheduler/api/service/impl/TenantServiceImpl.java | 1 + .../dolphinscheduler/api/service/impl/UsersServiceImpl.java | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AccessTokenServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AccessTokenServiceImpl.java index 0bc8371108..39048469be 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AccessTokenServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AccessTokenServiceImpl.java @@ -110,6 +110,7 @@ public class AccessTokenServiceImpl extends BaseServiceImpl implements AccessTok int insert = accessTokenMapper.insert(accessToken); if (insert > 0) { + result.put(Constants.DATA_LIST, accessToken); putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.CREATE_ACCESS_TOKEN_ERROR); diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java index 75347eee24..a02458a06d 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java @@ -110,7 +110,7 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectServic } if (projectMapper.insert(project) > 0) { - result.put(Constants.DATA_LIST, project.getId()); + result.put(Constants.DATA_LIST, project); putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.CREATE_PROJECT_ERROR); diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java index edd0e1d819..91889cd3dd 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java @@ -151,6 +151,7 @@ public class QueueServiceImpl extends BaseServiceImpl implements QueueService { queueObj.setUpdateTime(now); queueMapper.insert(queueObj); + result.put(Constants.DATA_LIST, queueObj); putMsg(result, Status.SUCCESS); return result; diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java index d0ccd75c47..c1295c1cbb 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java @@ -113,6 +113,7 @@ public class TenantServiceImpl extends BaseServiceImpl implements TenantService createTenantDirIfNotExists(tenantCode); } + result.put(Constants.DATA_LIST, tenant); putMsg(result, Status.SUCCESS); return result; diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java index a98d45f4ae..e07516ac0e 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java @@ -174,6 +174,7 @@ public class UsersServiceImpl extends BaseServiceImpl implements UsersService { HadoopUtils.getInstance().mkdir(userPath); } + result.put(Constants.DATA_LIST, user); putMsg(result, Status.SUCCESS); return result;