From 4846e33df2b93a7241693e838b85eb19c9eb711f Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 27 Jan 2022 15:07:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=9D=E5=AD=98=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=88=A0=E9=99=A4=E5=85=B3=E8=81=94=E5=9B=BE?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E6=97=B6=E6=B2=A1=E6=9C=89=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AEgraphId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/service/RelationshipEdgeService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java b/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java index 90896060f2..9a1bb097db 100644 --- a/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java +++ b/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java @@ -51,10 +51,9 @@ public class RelationshipEdgeService { } public void delete(String sourceId ,List targetIds) { - RelationshipEdgeExample example = new RelationshipEdgeExample(); - example.createCriteria().andSourceIdEqualTo(sourceId).andTargetIdIn(targetIds); - - relationshipEdgeMapper.deleteByExample(example); + targetIds.forEach(targetId -> { + delete(sourceId, targetId); + }); } /**