fix: 修复创建测试计划时重复提交,成功创建多个相同的计划

This commit is contained in:
Captain.B 2020-11-23 18:36:56 +08:00
parent 6d3b3ccfa4
commit c0b4b813f3
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ public class TestPlanService {
}
}
public List<TestPlan> getTestPlanByName(String name) {
public synchronized List<TestPlan> getTestPlanByName(String name) {
TestPlanExample example = new TestPlanExample();
example.createCriteria().andWorkspaceIdEqualTo(SessionUtils.getCurrentWorkspaceId())
.andNameEqualTo(name);