From 8e2a08a18b596f8dd0ee759bb9ec3f0e8d2b5049 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Mon, 8 Apr 2024 16:18:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=B7=B3=E8=BD=AC=E7=94=A8=E4=BE=8B=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1037239 --user=王旭 【项目管理】批量复制功能用例-项目管理日志查看-点击名称跳转应该跳转至用例详情页 https://www.tapd.cn/55049933/s/1490496 --- .../functional/service/FunctionalCaseService.java | 10 +++++----- .../system/dto/request/OperationHistoryRequest.java | 2 +- .../system/mapper/BaseOperationHistoryMapper.xml | 7 ++----- .../case/tabContent/tabCaseChangeHistory.vue | 2 +- .../components/tabContent/tabChangeHistory.vue | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java index 84f168c6d0..9466e7c3aa 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java @@ -200,7 +200,7 @@ public class FunctionalCaseService { //记录日志 FunctionalCaseHistoryLogDTO historyLogDTO = getImportLogModule(functionalCase); - saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.CASE_MANAGEMENT_CASE_CREATE); + saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.FUNCTIONAL_CASE); return functionalCase; } @@ -420,7 +420,7 @@ public class FunctionalCaseService { //获取变更历史数量数量 OperationHistoryExample operationHistoryExample = new OperationHistoryExample(); List types = List.of(OperationLogType.ADD.name(), OperationLogType.IMPORT.name(), OperationLogType.UPDATE.name()); - List modules = List.of(OperationLogModule.CASE_MANAGEMENT_CASE_CREATE, OperationLogModule.CASE_MANAGEMENT_CASE_UPDATE); + List modules = List.of(OperationLogModule.FUNCTIONAL_CASE); operationHistoryExample.createCriteria().andSourceIdEqualTo(functionalCaseDetailDTO.getId()).andTypeIn(types).andModuleIn(modules); functionalCaseDetailDTO.setHistoryCount((int) operationHistoryMapper.countByExample(operationHistoryExample)); @@ -834,7 +834,7 @@ public class FunctionalCaseService { historyLogDTO.setCustomFields(customFields); historyLogDTO.setCaseAttachments(caseAttachments); historyLogDTO.setFileAssociationList(fileAssociationList); - saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.CASE_MANAGEMENT_CASE_CREATE); + saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.FUNCTIONAL_CASE); } } } @@ -1092,7 +1092,7 @@ public class FunctionalCaseService { List customFields = functionalCaseCustomFieldMapper.selectByExample(fieldExample); FunctionalCaseHistoryLogDTO historyLogDTO = new FunctionalCaseHistoryLogDTO(functionalCase, caseBlob, customFields, new ArrayList<>(), new ArrayList<>()); - saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.IMPORT.name(), OperationLogModule.CASE_MANAGEMENT_CASE_CREATE); + saveImportDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.IMPORT.name(), OperationLogModule.FUNCTIONAL_CASE); } @@ -1223,7 +1223,7 @@ public class FunctionalCaseService { //记录新值 FunctionalCaseHistoryLogDTO modifiedLogDTO = getImportLogModule(functionalCase); //记录日志 - saveImportDataLog(functionalCase, originalValue, modifiedLogDTO, userId, organizationId, OperationLogType.IMPORT.name(), OperationLogModule.CASE_MANAGEMENT_CASE_UPDATE); + saveImportDataLog(functionalCase, originalValue, modifiedLogDTO, userId, organizationId, OperationLogType.IMPORT.name(), OperationLogModule.FUNCTIONAL_CASE); } private void addStatusIds(List caseIds, FunctionalCase functionalCase, FunctionalCaseExcelData functionalCaseExcelData) { diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/request/OperationHistoryRequest.java b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/request/OperationHistoryRequest.java index 1f55fa4fb8..9f2e98c1b4 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/request/OperationHistoryRequest.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/request/OperationHistoryRequest.java @@ -33,7 +33,7 @@ public class OperationHistoryRequest extends BasePageRequest implements Serializ private List types; @Schema(description = "操作模块") - private List modules; + private String modules; } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseOperationHistoryMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseOperationHistoryMapper.xml index 2ad5c6e6bf..a78284a0db 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseOperationHistoryMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseOperationHistoryMapper.xml @@ -62,11 +62,8 @@ #{type} - - AND operation_history.`module` in - - #{module} - + + AND operation_history.`module` like CONCAT('%',#{request.modules},'%') diff --git a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue index 1f2beaa179..070db26b89 100644 --- a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue +++ b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue @@ -147,7 +147,7 @@ setLoadListParams({ projectId: appStore.currentProjectId, sourceId: props.sourceId, - modules: ['API_TEST_MANAGEMENT_CASE'], + modules: 'API_TEST_MANAGEMENT_CASE', types: typeFilter.value, }); loadList(); diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabChangeHistory.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabChangeHistory.vue index 4fd818a039..4209b77185 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabChangeHistory.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabChangeHistory.vue @@ -238,7 +238,7 @@ projectId: appStore.currentProjectId, sourceId: props.caseId, types: ['IMPORT', 'ADD', 'UPDATE'], - modules: ['CASE_MANAGEMENT_CASE_CREATE', 'CASE_MANAGEMENT_CASE_UPDATE'], + modules: 'CASE_MANAGEMENT_CASE', }); await loadList(); featureCaseStore.getCaseCounts(props.caseId);