From de786f42f96a5baac1e30964e9fc0519fc7eb423 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 24 Nov 2020 14:35:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=97=B6=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=8C=E6=88=90=E5=8A=9F=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E7=9B=B8=E5=90=8C=E7=9A=84=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/service/TestPlanService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index ee5a113fbc..4aab152552 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -96,7 +96,7 @@ public class TestPlanService { @Resource UserMapper userMapper; - public void addTestPlan(AddTestPlanRequest testPlan) { + public synchronized void addTestPlan(AddTestPlanRequest testPlan) { if (getTestPlanByName(testPlan.getName()).size() > 0) { MSException.throwException(Translator.get("plan_name_already_exists")); } @@ -141,7 +141,7 @@ public class TestPlanService { } } - public synchronized List getTestPlanByName(String name) { + public List getTestPlanByName(String name) { TestPlanExample example = new TestPlanExample(); example.createCriteria().andWorkspaceIdEqualTo(SessionUtils.getCurrentWorkspaceId()) .andNameEqualTo(name);