From 6b5706d6b3312173b5b8d8f364bc840dfe721835 Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Fri, 24 May 2019 16:50:47 +0800 Subject: [PATCH] master startup lock dev update --- .../main/java/cn/escheduler/api/service/UsersService.java | 3 +++ .../java/cn/escheduler/dao/mapper/UserMapperProvider.java | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/escheduler-api/src/main/java/cn/escheduler/api/service/UsersService.java b/escheduler-api/src/main/java/cn/escheduler/api/service/UsersService.java index 16766a98cf..5db8662c07 100644 --- a/escheduler-api/src/main/java/cn/escheduler/api/service/UsersService.java +++ b/escheduler-api/src/main/java/cn/escheduler/api/service/UsersService.java @@ -115,6 +115,9 @@ public class UsersService extends BaseService { user.setUserType(UserType.GENERAL_USER); user.setCreateTime(now); user.setUpdateTime(now); + if (StringUtils.isEmpty(queue)){ + queue = ""; + } user.setQueue(queue); // save user diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/UserMapperProvider.java b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/UserMapperProvider.java index f70ba8250f..4a7df12a0f 100644 --- a/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/UserMapperProvider.java +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/UserMapperProvider.java @@ -203,7 +203,9 @@ public class UserMapperProvider { public String queryUserPaging(Map parameter) { return new SQL() { { - SELECT("u.*,t.tenant_name,q.queue_name"); + SELECT("u.id,u.user_name,u.user_password,u.user_type,u.email,u.phone,u.tenant_id,u.create_time,u.update_time,t.tenant_name," + + "case when u.queue <> '' then u.queue else q.queue_name end as queue," + + "q.queue_name"); FROM(TABLE_NAME + " u "); LEFT_OUTER_JOIN("t_escheduler_tenant t on u.tenant_id = t.id"); LEFT_OUTER_JOIN("t_escheduler_queue q on t.queue_id = q.id"); @@ -228,7 +230,8 @@ public class UserMapperProvider { public String queryDetailsById(Map parameter) { return new SQL() { { - SELECT("u.*,q.queue_name,t.tenant_name"); + SELECT("u.*, t.tenant_name," + + "case when u.queue <> '' then u.queue else q.queue_name end as queue_name"); FROM(TABLE_NAME + " u,t_escheduler_tenant t,t_escheduler_queue q");