diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogModule.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogModule.java index d4994544ec..d95c527f59 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogModule.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogModule.java @@ -71,5 +71,8 @@ public class OperationLogModule { public static final String SETTING_ORGANIZATION = "SETTING_ORGANIZATION"; public static final String SETTING_ORGANIZATION_MEMBER = "SETTING_ORGANIZATION_MEMBER"; public static final String SETTING_ORGANIZATION_SERVICE = "SETTING_ORGANIZATION_SERVICE"; + + //系统设置-组织-项目 + public static final String SETTING_SYSTEM_ORGANIZATION_PROJECT = "SETTING_SYSTEM_ORGANIZATION_PROJECT"; } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java index 3fe9b22432..dd530e9c86 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java @@ -232,7 +232,7 @@ public class CommonProjectService { memberRequest.setProjectIds(List.of(project.getId())); memberRequest.setUserIds(insertIds); this.addProjectAdmin(memberRequest, updateUser, path, OperationLogType.ADD.name(), - Translator.get("update"), module); + Translator.get("add"), module); } } else { if (CollectionUtils.isNotEmpty(orgUserIds)) { diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java index 011c5ee5b6..c85cb52bdd 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java @@ -32,7 +32,7 @@ public class OrganizationProjectLogService { null, null, OperationLogType.ADD.name(), - OperationLogModule.ORGANIZATION_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); @@ -52,7 +52,7 @@ public class OrganizationProjectLogService { project.getId(), project.getCreateUser(), OperationLogType.UPDATE.name(), - OperationLogModule.ORGANIZATION_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); @@ -95,7 +95,7 @@ public class OrganizationProjectLogService { id, project.getCreateUser(), OperationLogType.DELETE.name(), - OperationLogModule.ORGANIZATION_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); @@ -118,7 +118,7 @@ public class OrganizationProjectLogService { id, null, OperationLogType.RECOVER.name(), - OperationLogModule.ORGANIZATION_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); return dto; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java index 4f9c66ccce..331e88a224 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java @@ -46,7 +46,7 @@ public class OrganizationProjectService { * @return */ public ProjectExtendDTO add(AddProjectRequest addProjectDTO, String createUser) { - return commonProjectService.add(addProjectDTO, createUser, ADD_PROJECT, OperationLogModule.ORGANIZATION_PROJECT); + return commonProjectService.add(addProjectDTO, createUser, ADD_PROJECT, OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT); } public List getProjectList(OrganizationProjectRequest request) { @@ -57,7 +57,7 @@ public class OrganizationProjectService { } public ProjectExtendDTO update(UpdateProjectRequest updateProjectDto, String updateUser) { - return commonProjectService.update(updateProjectDto, updateUser, UPDATE_PROJECT, OperationLogModule.ORGANIZATION_PROJECT); + return commonProjectService.update(updateProjectDto, updateUser, UPDATE_PROJECT, OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT); } public int delete(String id, String deleteUser) { @@ -76,11 +76,11 @@ public class OrganizationProjectService { */ public void addProjectMember(ProjectAddMemberBatchRequest request, String createUser) { commonProjectService.addProjectMember(request, createUser, ADD_MEMBER, - OperationLogType.ADD.name(), Translator.get("add"), OperationLogModule.ORGANIZATION_PROJECT); + OperationLogType.ADD.name(), Translator.get("add"), OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT); } public int removeProjectMember(String projectId, String userId, String createUser) { - return commonProjectService.removeProjectMember(projectId, userId, createUser,OperationLogModule.ORGANIZATION_PROJECT, StringUtils.join(REMOVE_PROJECT_MEMBER,projectId, "/", userId)); + return commonProjectService.removeProjectMember(projectId, userId, createUser, OperationLogModule.SETTING_SYSTEM_ORGANIZATION_PROJECT, StringUtils.join(REMOVE_PROJECT_MEMBER, projectId, "/", userId)); } public int revoke(String id) { diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java index 6de07d41cc..aa63023541 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java @@ -32,7 +32,7 @@ public class SystemProjectLogService { null, null, OperationLogType.ADD.name(), - OperationLogModule.SYSTEM_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); @@ -52,7 +52,7 @@ public class SystemProjectLogService { project.getId(), project.getCreateUser(), OperationLogType.UPDATE.name(), - OperationLogModule.SYSTEM_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); @@ -70,7 +70,7 @@ public class SystemProjectLogService { project.getId(), project.getCreateUser(), OperationLogType.UPDATE.name(), - OperationLogModule.SYSTEM_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION, project.getName()); dto.setMethod(HttpMethodConstants.GET.name()); @@ -96,7 +96,7 @@ public class SystemProjectLogService { id, project.getCreateUser(), OperationLogType.DELETE.name(), - OperationLogModule.SYSTEM_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); @@ -119,7 +119,7 @@ public class SystemProjectLogService { id, null, OperationLogType.RECOVER.name(), - OperationLogModule.SYSTEM_PROJECT, + OperationLogModule.SETTING_SYSTEM_ORGANIZATION, project.getName()); dto.setOriginalValue(JSON.toJSONBytes(project)); return dto; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java index 22353c2c45..0d2e78fadf 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java @@ -45,7 +45,7 @@ public class SystemProjectService { * @return */ public ProjectExtendDTO add(AddProjectRequest addProjectDTO, String createUser) { - return commonProjectService.add(addProjectDTO, createUser, ADD_PROJECT, OperationLogModule.SYSTEM_PROJECT); + return commonProjectService.add(addProjectDTO, createUser, ADD_PROJECT, OperationLogModule.SETTING_SYSTEM_ORGANIZATION); } public List getProjectList(ProjectRequest request) { @@ -54,7 +54,7 @@ public class SystemProjectService { } public ProjectExtendDTO update(UpdateProjectRequest updateProjectDto, String updateUser) { - return commonProjectService.update(updateProjectDto, updateUser, UPDATE_PROJECT, OperationLogModule.SYSTEM_PROJECT); + return commonProjectService.update(updateProjectDto, updateUser, UPDATE_PROJECT, OperationLogModule.SETTING_SYSTEM_ORGANIZATION); } public int delete(String id, String deleteUser) { @@ -73,11 +73,11 @@ public class SystemProjectService { */ public void addProjectMember(ProjectAddMemberBatchRequest request, String createUser) { commonProjectService.addProjectMember(request, createUser, ADD_MEMBER, - OperationLogType.ADD.name(), Translator.get("add"), OperationLogModule.SYSTEM_PROJECT); + OperationLogType.ADD.name(), Translator.get("add"), OperationLogModule.SETTING_SYSTEM_ORGANIZATION); } public int removeProjectMember(String projectId, String userId, String createUser) { - return commonProjectService.removeProjectMember(projectId, userId, createUser,OperationLogModule.SYSTEM_PROJECT, StringUtils.join(REMOVE_PROJECT_MEMBER,projectId, "/", userId)); + return commonProjectService.removeProjectMember(projectId, userId, createUser, OperationLogModule.SETTING_SYSTEM_ORGANIZATION, StringUtils.join(REMOVE_PROJECT_MEMBER, projectId, "/", userId)); } public int revoke(String id) {