diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java index 0341b4aac5..a32d62054a 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseAttachmentController.java @@ -122,7 +122,7 @@ public class FunctionalCaseAttachmentController { @CheckOwner(resourceId = "#projectId", resourceType = "project") public String update(@PathVariable String projectId, @PathVariable String id) { FileLogRecord fileLogRecord = FileLogRecord.builder() - .logModule(OperationLogModule.FUNCTIONAL_CASE) + .logModule(OperationLogModule.CASE_MANAGEMENT_CASE_CASE) .operator(SessionUtils.getUserId()) .projectId(projectId) .build(); @@ -138,7 +138,7 @@ public class FunctionalCaseAttachmentController { byte[] fileByte = functionalCaseAttachmentService.getFileByte(request); FunctionalCaseAttachment attachment = functionalCaseAttachmentService.getAttachment(request); FileLogRecord fileLogRecord = FileLogRecord.builder() - .logModule(OperationLogModule.FUNCTIONAL_CASE) + .logModule(OperationLogModule.CASE_MANAGEMENT_CASE_CASE) .operator(SessionUtils.getUserId()) .projectId(request.getProjectId()) .build(); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java index f4aa51931b..9d03d4bdb4 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java @@ -101,7 +101,7 @@ public class FunctionalCaseAttachmentService { */ public List uploadFile(String projectId, String caseId, List files, Boolean isLocal, String userId) { LogUtils.info("开始上传附件"); - ListfileIds = new ArrayList<>(); + List fileIds = new ArrayList<>(); if (CollectionUtils.isNotEmpty(files)) { files.forEach(file -> { String fileId = IDGenerator.nextStr(); @@ -263,7 +263,7 @@ public class FunctionalCaseAttachmentService { private FileLogRecord createFileLogRecord(String logUrl, String operator, String projectId) { return FileLogRecord.builder() - .logModule(OperationLogModule.FUNCTIONAL_CASE) + .logModule(OperationLogModule.CASE_MANAGEMENT_CASE_CASE) .operator(operator) .projectId(projectId) .build(); @@ -429,7 +429,7 @@ public class FunctionalCaseAttachmentService { /** * 上传用例管理相关的资源文件 * - * @param folder 用例管理文件路径 + * @param folder 用例管理文件路径 * @param fileMap key:fileId value:fileName */ public void uploadFileResource(String folder, Map fileMap, String projectId, String caseId) { diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseLogService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseLogService.java index 623b6d9ac7..a251151296 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseLogService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseLogService.java @@ -141,7 +141,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.DELETE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, functionalCase.getName()); dto.setPath("/functional/case/delete"); @@ -168,7 +168,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.DELETE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, functionalCase.getName()); dto.setPath(path); @@ -195,7 +195,7 @@ public class FunctionalCaseLogService { id, null, OperationLogType.RECOVER.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_RECYCLE, functionalCase.getName()); dto.setOriginalValue(JSON.toJSONBytes(functionalCase)); return dto; @@ -221,7 +221,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.RECOVER.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_RECYCLE, functionalCase.getName()); dto.setPath("/functional/case/batch/recover"); @@ -248,7 +248,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.DELETE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_RECYCLE, functionalCase.getName()); dto.setPath("/functional/case/trash/delete"); @@ -279,7 +279,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.DISASSOCIATE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, functionalCase.getName()); dto.setPath("/functional/case/demand/cancel/"); @@ -305,7 +305,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.DISASSOCIATE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, functionalCase.getName()); dto.setPath("/functional/case/test/disassociate/case"); @@ -344,7 +344,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.DELETE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_RECYCLE, functionalCase.getName()); dto.setPath("/functional/case/batch/delete"); @@ -379,7 +379,7 @@ public class FunctionalCaseLogService { bugRelationCase.getBugId(), null, OperationLogType.DISASSOCIATE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, bug.getTitle() + "缺陷"); dto.setPath("/functional/case/test/disassociate/bug/" + id); @@ -400,7 +400,7 @@ public class FunctionalCaseLogService { functionalCase.getId(), null, OperationLogType.DISASSOCIATE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, functionalCase.getName()); dto.setPath("/functional/case/relationship/delete"); @@ -419,7 +419,7 @@ public class FunctionalCaseLogService { sourceId, null, OperationLogType.UPDATE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, content); dto.setHistory(true); dto.setPath(path); @@ -435,7 +435,7 @@ public class FunctionalCaseLogService { request.getFileId(), userId, OperationLogType.EXPORT.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, ""); dto.setHistory(true); dto.setPath("/functional/case/export/" + url); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java index e098ac24e9..7589de00c3 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java @@ -109,9 +109,6 @@ public class FunctionalCaseMinderService { @Resource private ExtFunctionalCaseModuleMapper extFunctionalCaseModuleMapper; - @Resource - private FunctionalCaseLogService functionalCaseLogService; - @Resource private FunctionalCaseNoticeService functionalCaseNoticeService; @@ -120,6 +117,8 @@ public class FunctionalCaseMinderService { @Resource private ProjectTemplateService projectTemplateService; + @Resource + private FunctionalCaseModuleLogService functionalCaseModuleLogService; /** @@ -527,7 +526,7 @@ public class FunctionalCaseMinderService { functionalCase.getId(), userId, OperationLogType.DELETE.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, functionalCase.getName()); dto.setPath("/functional/mind/case/edit"); @@ -1005,7 +1004,7 @@ public class FunctionalCaseMinderService { caseId, userId, operationLogType.name(), - OperationLogModule.FUNCTIONAL_CASE, + OperationLogModule.CASE_MANAGEMENT_CASE_CASE, historyLogDTO.getFunctionalCase().getName()); dto.setHistory(true); dto.setPath("/functional/mind/case/edit"); @@ -1238,7 +1237,7 @@ public class FunctionalCaseMinderService { throw new MSException(Translator.get("functional_case.module.default.name.cut_error")); } List functionalCases = functionalCaseModuleService.deleteModuleByIds(moduleIds, new ArrayList<>(), user.getId()); - functionalCaseModuleService.batchDelLog(functionalCases, request.getProjectId()); + functionalCaseModuleLogService.batchDelLog(functionalCases, request.getProjectId(), user.getId(), "/functional/mind/case/edit"); List finalCaseIds = caseIds; List caseIdList = functionalCases.stream().map(FunctionalCase::getId).filter(id -> !finalCaseIds.contains(id)).toList(); if (CollectionUtils.isNotEmpty(caseIdList)) { 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 new file mode 100644 index 0000000000..aa71877700 --- /dev/null +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleLogService.java @@ -0,0 +1,107 @@ +package io.metersphere.functional.service; + +import io.metersphere.functional.domain.FunctionalCase; +import io.metersphere.functional.domain.FunctionalCaseModule; +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.system.dto.builder.LogDTOBuilder; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.dto.LogDTO; +import io.metersphere.system.log.service.OperationLogService; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; + +@Service +@Transactional(rollbackFor = Exception.class) +public class FunctionalCaseModuleLogService { + private static final String FUNCTIONAL_CASE_MODULE = "/functional/case/module"; + private static final String ADD = FUNCTIONAL_CASE_MODULE + "/add"; + private static final String UPDATE = FUNCTIONAL_CASE_MODULE + "/update"; + @Resource + private ProjectMapper projectMapper; + @Resource + private OperationLogService operationLogService; + + /** + * 功能用例添加模块日志 + * + * @param functionalCaseModule + * @param userId + */ + public void addModuleLog(FunctionalCaseModule functionalCaseModule, String userId) { + Project project = projectMapper.selectByPrimaryKey(functionalCaseModule.getProjectId()); + LogDTO dto = LogDTOBuilder.builder() + .projectId(functionalCaseModule.getProjectId()) + .organizationId(project.getOrganizationId()) + .type(OperationLogType.ADD.name()) + .module(OperationLogModule.CASE_MANAGEMENT_CASE_MODULE) + .method(HttpMethodConstants.POST.name()) + .path(ADD) + .sourceId(functionalCaseModule.getId()) + .content(functionalCaseModule.getName()) + .originalValue(JSON.toJSONBytes(functionalCaseModule)) + .createUser(userId) + .build().getLogDTO(); + operationLogService.add(dto); + } + + + /** + * 功能用例更新模块日志 + * + * @param module + * @param operator + */ + public void updateModuleLog(FunctionalCaseModule module, String operator) { + Project project = projectMapper.selectByPrimaryKey(module.getProjectId()); + LogDTO dto = LogDTOBuilder.builder() + .projectId(project.getId()) + .organizationId(project.getOrganizationId()) + .type(OperationLogType.UPDATE.name()) + .module(OperationLogModule.CASE_MANAGEMENT_CASE_MODULE) + .method(HttpMethodConstants.POST.name()) + .path(UPDATE) + .sourceId(module.getId()) + .content(module.getName()) + .originalValue(JSON.toJSONBytes(module)) + .createUser(operator) + .build().getLogDTO(); + operationLogService.add(dto); + } + + + /** + * 功能用例模块删除日志 + * + * @param functionalCases + * @param projectId + */ + public void batchDelLog(List functionalCases, String projectId, String userId, String path) { + Project project = projectMapper.selectByPrimaryKey(projectId); + List dtoList = new ArrayList<>(); + functionalCases.forEach(item -> { + LogDTO dto = new LogDTO( + projectId, + project.getOrganizationId(), + item.getId(), + userId, + OperationLogType.DELETE.name(), + OperationLogModule.CASE_MANAGEMENT_CASE_MODULE, + item.getName()); + dto.setPath(path); + dto.setMethod(HttpMethodConstants.GET.name()); + dto.setOriginalValue(JSON.toJSONBytes(item)); + dtoList.add(dto); + }); + operationLogService.batchAdd(dtoList); + } + + +} diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java index 17361a6867..7d412b4028 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java @@ -7,7 +7,10 @@ package io.metersphere.functional.service; -import io.metersphere.functional.domain.*; +import io.metersphere.functional.domain.FunctionalCase; +import io.metersphere.functional.domain.FunctionalCaseExample; +import io.metersphere.functional.domain.FunctionalCaseModule; +import io.metersphere.functional.domain.FunctionalCaseModuleExample; import io.metersphere.functional.mapper.ExtFunctionalCaseMapper; import io.metersphere.functional.mapper.ExtFunctionalCaseModuleMapper; import io.metersphere.functional.mapper.FunctionalCaseMapper; @@ -17,18 +20,12 @@ import io.metersphere.functional.request.FunctionalCaseModuleUpdateRequest; import io.metersphere.project.dto.ModuleCountDTO; import io.metersphere.project.dto.NodeSortDTO; import io.metersphere.project.service.ModuleTreeService; -import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.constants.ModuleConstants; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.User; import io.metersphere.system.dto.sdk.BaseTreeNode; import io.metersphere.system.dto.sdk.request.NodeMoveRequest; -import io.metersphere.system.log.constants.OperationLogModule; -import io.metersphere.system.log.constants.OperationLogType; -import io.metersphere.system.log.dto.LogDTO; -import io.metersphere.system.log.service.OperationLogService; import io.metersphere.system.mapper.UserMapper; import io.metersphere.system.notice.constants.NoticeConstants; import io.metersphere.system.uid.IDGenerator; @@ -60,11 +57,11 @@ public class FunctionalCaseModuleService extends ModuleTreeService { @Resource private FunctionalCaseMapper functionalCaseMapper; @Resource - private OperationLogService operationLogService; - @Resource private UserMapper userMapper; @Resource private FunctionalCaseNoticeService functionalCaseNoticeService; + @Resource + private FunctionalCaseModuleLogService functionalCaseModuleLogService; public List getTree(String projectId) { @@ -85,6 +82,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService { functionalCaseModule.setCreateUser(userId); functionalCaseModule.setUpdateUser(userId); functionalCaseModuleMapper.insert(functionalCaseModule); + functionalCaseModuleLogService.addModuleLog(functionalCaseModule, userId); return functionalCaseModule.getId(); } @@ -100,6 +98,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService { updateModule.setCreateUser(null); updateModule.setCreateTime(null); functionalCaseModuleMapper.updateByPrimaryKeySelective(updateModule); + functionalCaseModuleLogService.updateModuleLog(updateModule, userId); } public void moveNode(NodeMoveRequest request, String userId) { @@ -129,33 +128,13 @@ public class FunctionalCaseModuleService extends ModuleTreeService { FunctionalCaseModule deleteModule = functionalCaseModuleMapper.selectByPrimaryKey(moduleId); if (deleteModule != null) { List functionalCases = this.deleteModuleByIds(Collections.singletonList(moduleId), new ArrayList<>(), userId); - batchDelLog(functionalCases, deleteModule.getProjectId()); + functionalCaseModuleLogService.batchDelLog(functionalCases, deleteModule.getProjectId(), userId, "/functional/case/module/delete/" + moduleId); List ids = functionalCases.stream().map(FunctionalCase::getId).toList(); User user = userMapper.selectByPrimaryKey(userId); functionalCaseNoticeService.batchSendNotice(deleteModule.getProjectId(), ids, user, NoticeConstants.Event.DELETE); } } - public void batchDelLog(List functionalCases, String projectId) { - List dtoList = new ArrayList<>(); - functionalCases.forEach(item -> { - LogDTO dto = new LogDTO( - projectId, - "", - item.getId(), - item.getCreateUser(), - OperationLogType.DELETE.name(), - OperationLogModule.FUNCTIONAL_CASE, - item.getName()); - - dto.setPath("/functional/case/module/delete/"); - dto.setMethod(HttpMethodConstants.GET.name()); - dto.setOriginalValue(JSON.toJSONBytes(item)); - dtoList.add(dto); - }); - operationLogService.batchAdd(dtoList); - } - public List deleteModuleByIds(List deleteIds, List functionalCases, String userId) { if (CollectionUtils.isEmpty(deleteIds)) { return functionalCases; 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 5b0ec8c952..78c10fb8f6 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 @@ -205,7 +205,7 @@ public class FunctionalCaseService { //记录日志 FunctionalCaseHistoryLogDTO historyLogDTO = getAddLogModule(functionalCase); - saveAddDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.FUNCTIONAL_CASE); + saveAddDataLog(functionalCase, new FunctionalCaseHistoryLogDTO(), historyLogDTO, userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.CASE_MANAGEMENT_CASE_CASE); return functionalCase; } @@ -459,7 +459,7 @@ public class FunctionalCaseService { //获取变更历史数量数量 OperationHistoryExample operationHistoryExample = new OperationHistoryExample(); List types = List.of(OperationLogType.ADD.name(), OperationLogType.IMPORT.name(), OperationLogType.UPDATE.name()); - operationHistoryExample.createCriteria().andSourceIdEqualTo(functionalCaseDetailDTO.getId()).andModuleEqualTo(OperationLogModule.FUNCTIONAL_CASE).andTypeIn(types); + operationHistoryExample.createCriteria().andSourceIdEqualTo(functionalCaseDetailDTO.getId()).andModuleEqualTo(OperationLogModule.CASE_MANAGEMENT_CASE_CASE).andTypeIn(types); functionalCaseDetailDTO.setHistoryCount((int) operationHistoryMapper.countByExample(operationHistoryExample)); } @@ -927,7 +927,7 @@ public class FunctionalCaseService { functionalCaseAttachmentService.association(entry.getValue(), entry.getKey(), userId, FUNCTIONAL_CASE_BATCH_COPY_FILE_LOG_URL, request.getProjectId()); }); addLogMap.entrySet().forEach(entry -> { - saveAddDataLog(entry.getKey(), new FunctionalCaseHistoryLogDTO(), entry.getValue(), userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.FUNCTIONAL_CASE); + saveAddDataLog(entry.getKey(), new FunctionalCaseHistoryLogDTO(), entry.getValue(), userId, organizationId, OperationLogType.ADD.name(), OperationLogModule.CASE_MANAGEMENT_CASE_CASE); }); User user = userMapper.selectByPrimaryKey(userId); @@ -1128,7 +1128,7 @@ public class FunctionalCaseService { //新增用例记录日志 historyLogDTOS.forEach(historyLogDTO -> { - batchSaveImportData(historyLogDTO, new FunctionalCaseHistoryLogDTO(), user, OperationLogType.IMPORT.name(), OperationLogModule.FUNCTIONAL_CASE, logDTOS); + batchSaveImportData(historyLogDTO, new FunctionalCaseHistoryLogDTO(), user, OperationLogType.IMPORT.name(), OperationLogModule.CASE_MANAGEMENT_CASE_CASE, logDTOS); }); operationLogService.batchAdd(logDTOS); @@ -1372,7 +1372,7 @@ public class FunctionalCaseService { FunctionalCase oldCase = collect.get(newData.getFunctionalCase().getId()).getFirst(); FunctionalCaseBlob oldBlod = blobsCollect.get(newData.getFunctionalCase().getId()).getFirst(); List oldCustomFields = customFieldMap.get(newData.getFunctionalCase().getId()); - batchSaveImportData(newData, new FunctionalCaseHistoryLogDTO(oldCase, oldBlod, oldCustomFields, new ArrayList<>(), new ArrayList<>()), user, OperationLogType.IMPORT.name(), OperationLogModule.FUNCTIONAL_CASE, logDTOS); + batchSaveImportData(newData, new FunctionalCaseHistoryLogDTO(oldCase, oldBlod, oldCustomFields, new ArrayList<>(), new ArrayList<>()), user, OperationLogType.IMPORT.name(), OperationLogModule.CASE_MANAGEMENT_CASE_CASE, logDTOS); } /** diff --git a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseModuleControllerTests.java b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseModuleControllerTests.java index 7a21f54ce1..efec6b4775 100644 --- a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseModuleControllerTests.java +++ b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseModuleControllerTests.java @@ -19,7 +19,6 @@ import io.metersphere.system.base.BaseTest; import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.system.dto.sdk.BaseTreeNode; import io.metersphere.system.dto.sdk.request.NodeMoveRequest; -import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.system.uid.IDGenerator; import jakarta.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; @@ -704,8 +703,6 @@ public class FunctionalCaseModuleControllerTests extends BaseTest { //service层判断:测试删除空集合 functionalCaseModuleService.deleteModuleByIds(new ArrayList<>(), new ArrayList<>(), "admin"); - checkLog(functionalCase.getId(), OperationLogType.DELETE, URL_MODULE_TREE_DELETE); - } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java index 443d3b8525..a8462dfe32 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java @@ -136,7 +136,12 @@ public class OperationLogModule { public static final String FUNCTIONAL_CASE = "CASE_MANAGEMENT_CASE"; public static final String CASE_MANAGEMENT_CASE_CREATE = "CASE_MANAGEMENT_CASE_CREATE"; public static final String CASE_MANAGEMENT_CASE_UPDATE = "CASE_MANAGEMENT_CASE_UPDATE"; + //功能用例-回收站 public static final String CASE_MANAGEMENT_CASE_RECYCLE = "CASE_MANAGEMENT_CASE_RECYCLE"; + //功能用例-模块 + public static final String CASE_MANAGEMENT_CASE_MODULE = "CASE_MANAGEMENT_CASE_MODULE"; + //功能用例-用例 + public static final String CASE_MANAGEMENT_CASE_CASE = "CASE_MANAGEMENT_CASE_CASE"; public static final String CASE_REVIEW = "CASE_MANAGEMENT_REVIEW";