From 9c28dd2fa41d7a1fe89ab28d216ee0a6aea5750a Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Mon, 18 Dec 2023 17:04:03 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E8=8E=B7=E5=8F=96=E5=90=8C=E6=AD=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functional/service/FunctionalCaseAttachmentService.java | 2 -- .../project/controller/ProjectApplicationController.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) 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 cd5fbdaad1..94749eb352 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 @@ -151,8 +151,6 @@ public class FunctionalCaseAttachmentService { FunctionalCaseAttachmentExample example = new FunctionalCaseAttachmentExample(); example.createCriteria().andFileIdIn(deleteFileMetaIds).andCaseIdEqualTo(caseId).andLocalEqualTo(true); List delAttachment = functionalCaseAttachmentMapper.selectByExample(example); - example.clear(); - example.createCriteria().andIdIn(deleteFileMetaIds); functionalCaseAttachmentMapper.deleteByExample(example); this.deleteMinioFile(delAttachment, projectId, caseId); } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java index 886fb6405a..877dc48ad6 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java @@ -180,7 +180,7 @@ public class ProjectApplicationController { @RequiresPermissions(PermissionConstants.PROJECT_APPLICATION_CASE_READ) public Map getCase(@Validated @RequestBody ProjectApplicationRequest request) { List types = Arrays.asList(ProjectApplicationType.CASE.values()).stream().map(ProjectApplicationType.CASE::name).collect(Collectors.toList()); - types.add(ProjectApplicationType.CASE_RELATED_CONFIG.CASE_RELATED.name() + ProjectApplicationType.CASE_RELATED_CONFIG.CASE_ENABLE.name()); + types.add(ProjectApplicationType.CASE_RELATED_CONFIG.CASE_RELATED.name() + "_" + ProjectApplicationType.CASE_RELATED_CONFIG.CASE_ENABLE.name()); return projectApplicationService.get(request, types); } @@ -260,7 +260,7 @@ public class ProjectApplicationController { @Operation(summary = "缺陷管理-获取配置") @RequiresPermissions(PermissionConstants.PROJECT_APPLICATION_BUG_READ) public Map getBug(@Validated @RequestBody ProjectApplicationRequest request) { - List types = Arrays.asList(ProjectApplicationType.BUG.BUG_SYNC.name() + ProjectApplicationType.BUG_SYNC_CONFIG.SYNC_ENABLE.name()); + List types = Arrays.asList(ProjectApplicationType.BUG.BUG_SYNC.name() + "_" + ProjectApplicationType.BUG_SYNC_CONFIG.SYNC_ENABLE.name()); return projectApplicationService.get(request, types); }