From 8b2cc357ca5e8fabae58102bae8f4aa1227769c7 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 24 Dec 2024 16:25:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B5=8C=E5=A5=97=E4=BA=8B=E5=8A=A1?= =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1050774 --user=宋昌昌 【首页】切换项目后,切换到首页-刷新页面大概率会出现error https://www.tapd.cn/55049933/s/1636173 --- .../main/java/io/metersphere/bug/service/BugCommonService.java | 2 +- .../main/java/io/metersphere/bug/service/BugStatusService.java | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugCommonService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugCommonService.java index 2b19898836..e3f9adcdaf 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugCommonService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugCommonService.java @@ -42,7 +42,6 @@ import java.util.stream.Collectors; * @author song-cc-rock */ @Service -@Transactional(rollbackFor = Exception.class) public class BugCommonService { @Resource @@ -143,6 +142,7 @@ public class BugCommonService { * @param projectId 项目ID * @param bugIds 缺陷ID集合 */ + @Transactional(rollbackFor = Exception.class) public void clearAssociateResource(String projectId, List bugIds) { // 清空附件(关联, 本地上传, 富文本) FileAssociationExample example = new FileAssociationExample(); diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugStatusService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugStatusService.java index 871a24145d..ca9e946654 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugStatusService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugStatusService.java @@ -15,13 +15,11 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; 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 BugStatusService { @Resource private BugMapper bugMapper;