From fb74d1e957494d2af958d9f5a81163b3f5810f89 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 18 Feb 2022 18:10:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E9=87=8D=E5=A4=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=BC=BA=E9=99=B7=20--bug=3D1010386=20--user=3D?= =?UTF-8?q?=E9=99=88=E5=BB=BA=E6=98=9F=20=E3=80=90=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E3=80=91-=E5=8A=9F=E8=83=BD=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E5=B7=B2=E5=85=B3=E8=81=94=E7=9A=84=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E5=92=8C=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E4=B8=AD=E5=86=8D?= =?UTF-8?q?=E6=AC=A1=E5=85=B3=E8=81=94=E8=AF=A5=E7=BC=BA=E9=99=B7=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E4=BE=8B=E6=98=BE=E7=A4=BA=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=20https://www.tapd.cn/55049933/s/11059644?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/track/service/IssuesService.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/IssuesService.java b/backend/src/main/java/io/metersphere/track/service/IssuesService.java index 8262f7e47b..89642bafe2 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -161,7 +161,7 @@ public class IssuesService { issueRequest.setCaseResourceId(caseResourceId); ServiceUtils.getDefaultOrder(issueRequest.getOrders()); issueRequest.setRefType(refType); - return extIssuesMapper.getIssuesByCaseId(issueRequest); + return disconnectIssue(extIssuesMapper.getIssuesByCaseId(issueRequest)); } public IssuesWithBLOBs getIssue(String id) { @@ -588,8 +588,12 @@ public class IssuesService { IssuesRequest issueRequest = new IssuesRequest(); issueRequest.setPlanId(planId); List planIssues = extIssuesMapper.getPlanIssues(issueRequest); - Set ids = new HashSet<>(planIssues.size()); - Iterator iterator = planIssues.iterator(); + return disconnectIssue(planIssues); + } + + public List disconnectIssue(List issues) { + Set ids = new HashSet<>(issues.size()); + Iterator iterator = issues.iterator(); while (iterator.hasNext()) { IssuesDao next = iterator.next(); if (ids.contains(next.getId())) { @@ -597,7 +601,7 @@ public class IssuesService { } ids.add(next.getId()); } - return planIssues; + return issues; } public void changeStatus(IssuesRequest request) {