diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleLogService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleLogService.java index cde1c97621..9d4d0d35f0 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleLogService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleLogService.java @@ -6,6 +6,7 @@ import io.metersphere.project.domain.Project; import io.metersphere.project.mapper.ProjectMapper; import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.util.JSON; +import io.metersphere.sdk.util.Translator; import io.metersphere.system.dto.builder.LogDTOBuilder; import io.metersphere.system.log.constants.OperationLogModule; import io.metersphere.system.log.constants.OperationLogType; @@ -79,15 +80,15 @@ public class CaseReviewModuleLogService { /** * 评审删除模块日志 * - * @param caseReviews + * @param deleteModule * @param projectId * @param userId * @param path */ - public void batchDelLog(List caseReviews, String projectId, String userId, String path) { + public void batchDelLog(List deleteModule, String projectId, String userId, String path) { Project project = projectMapper.selectByPrimaryKey(projectId); List dtoList = new ArrayList<>(); - caseReviews.forEach(item -> { + deleteModule.forEach(item -> { LogDTO dto = new LogDTO( projectId, project.getOrganizationId(), @@ -95,7 +96,7 @@ public class CaseReviewModuleLogService { userId, OperationLogType.DELETE.name(), OperationLogModule.CASE_MANAGEMENT_REVIEW_REVIEW_MODULE, - item.getName()); + item.getName() + " " + Translator.get("log.delete_module")); dto.setPath(path); dto.setMethod(HttpMethodConstants.GET.name()); dto.setOriginalValue(JSON.toJSONBytes(item)); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java index ae6f3843da..3fd47b6bc9 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java @@ -119,8 +119,8 @@ public class CaseReviewModuleService extends ModuleTreeService { public void deleteModule(String moduleId, String userId) { CaseReviewModule deleteModule = caseReviewModuleMapper.selectByPrimaryKey(moduleId); if (deleteModule != null) { - List caseReviews = this.deleteModuleByIds(Collections.singletonList(moduleId), new ArrayList<>(), deleteModule.getProjectId()); - caseReviewModuleLogService.batchDelLog(caseReviews, deleteModule.getProjectId(), userId, "/case/review/module/delete/" + moduleId); + this.deleteModuleByIds(Collections.singletonList(moduleId), new ArrayList<>(), deleteModule.getProjectId()); + caseReviewModuleLogService.batchDelLog(List.of(deleteModule), deleteModule.getProjectId(), userId, "/case/review/module/delete/" + moduleId); } } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleLogService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleLogService.java index 6fbcf5009f..2742d058fd 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleLogService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleLogService.java @@ -6,6 +6,7 @@ import io.metersphere.project.domain.Project; import io.metersphere.project.mapper.ProjectMapper; import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.util.JSON; +import io.metersphere.sdk.util.Translator; import io.metersphere.system.dto.builder.LogDTOBuilder; import io.metersphere.system.log.constants.OperationLogModule; import io.metersphere.system.log.constants.OperationLogType; @@ -106,6 +107,7 @@ public class FunctionalCaseModuleLogService { /** * 功能用例模块删除日志 + * * @param deleteModule * @param projectId * @param userId @@ -122,7 +124,7 @@ public class FunctionalCaseModuleLogService { userId, type, OperationLogModule.CASE_MANAGEMENT_CASE_MODULE, - item.getName()); + item.getName() + " " + Translator.get("log.delete_module")); dto.setPath(path); dto.setMethod(HttpMethodConstants.GET.name()); dto.setOriginalValue(JSON.toJSONBytes(item)); diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleLogService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleLogService.java index c18f562e53..af9b1cd1a8 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleLogService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanModuleLogService.java @@ -73,7 +73,7 @@ public class TestPlanModuleLogService { .method(requestMethod) .path(requestUrl) .sourceId(deleteModule.getId()) - .content(deleteModule.getName()) + .content(deleteModule.getName() + " " + Translator.get("log.delete_module")) .originalValue(JSON.toJSONBytes(deleteModule)) .createUser(operator) .build().getLogDTO();