From 2c9214d70b180a2d12f8a4a532436ee23097495d Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 29 Jun 2021 15:51:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=94=A8=E6=88=B7=E7=BB=84):=20?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtGroupMapper.xml | 5 +-- .../io/metersphere/service/UserService.java | 4 --- .../system/components/GroupCascader.vue | 2 +- .../system/components/ProjectCascader.vue | 2 +- .../settings/system/group/GroupMember.vue | 32 ++++++++----------- .../settings/system/group/UserGroup.vue | 12 ++++--- 6 files changed, 25 insertions(+), 32 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml index c8ea689d6d..c7c392e111 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml @@ -4,7 +4,8 @@ diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index a9ddaed719..2ade75165f 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -377,10 +377,6 @@ public class UserService { MSException.throwException(Translator.get("cannot_delete_current_user")); } - UserRoleExample example = new UserRoleExample(); - example.createCriteria().andUserIdEqualTo(userId); - userRoleMapper.deleteByExample(example); - UserGroupExample userGroupExample = new UserGroupExample(); userGroupExample.createCriteria().andUserIdEqualTo(userId); userGroupMapper.deleteByExample(userGroupExample); diff --git a/frontend/src/business/components/settings/system/components/GroupCascader.vue b/frontend/src/business/components/settings/system/components/GroupCascader.vue index ed31b6c142..9d8b87c91b 100644 --- a/frontend/src/business/components/settings/system/components/GroupCascader.vue +++ b/frontend/src/business/components/settings/system/components/GroupCascader.vue @@ -37,7 +37,7 @@ export default { let validateSelect = (rule, value, callback) => { let checkNodes = this.$refs.cascadeSelector.getCheckedNodes(true); if (checkNodes.length === 0) { - callback(new Error(this.$t('user.select_group'))); + callback(new Error(this.$t('user.select_group').toString())); } callback(); }; diff --git a/frontend/src/business/components/settings/system/components/ProjectCascader.vue b/frontend/src/business/components/settings/system/components/ProjectCascader.vue index 97703d64d1..8ba4664050 100644 --- a/frontend/src/business/components/settings/system/components/ProjectCascader.vue +++ b/frontend/src/business/components/settings/system/components/ProjectCascader.vue @@ -43,7 +43,7 @@ export default { let validateSelect = (rule, value, callback) => { let checkNodes = this.$refs.cascadeSelector.getCheckedNodes(true); if (checkNodes.length === 0) { - callback(new Error(this.$t('user.select_project'))); + callback(new Error(this.$t('user.select_project').toString())); } callback(); }; diff --git a/frontend/src/business/components/settings/system/group/GroupMember.vue b/frontend/src/business/components/settings/system/group/GroupMember.vue index c74e5c41c7..3191bb6914 100644 --- a/frontend/src/business/components/settings/system/group/GroupMember.vue +++ b/frontend/src/business/components/settings/system/group/GroupMember.vue @@ -1,7 +1,6 @@