diff --git a/project-management/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml b/project-management/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml index 7a2970a848..632d3e8561 100644 --- a/project-management/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml +++ b/project-management/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml @@ -8,6 +8,23 @@ (SELECT COUNT(DISTINCT ug.user_id) FROM user_group ug JOIN user ON ug.user_id = user.id WHERE ug.group_id = temp.id AND ug.source_id = #{request.projectId}) AS memberSize FROM ( + SELECT g.*, w.name AS scopeName FROM `group` g, workspace w + + and g.scope_id = w.id + + AND g.type IN + + #{type} + + + + AND g.scope_id IN + + #{scope} + + + + UNION DISTINCT SELECT g.*, 'global' AS scopeName FROM `group` g g.scope_id = 'global'