fix(测试跟踪): 修复复制测试计划,有时会出现用例条数自动增加的缺陷

--bug=1020493 --user=王孝刚 【测试计划】GitHub#20356复制测试计划,有时会出现用例条数自动增加的情况
https://www.tapd.cn/55049933/s/1346372
This commit is contained in:
wxg0103 2023-03-07 18:22:02 +08:00 committed by fit2-zhao
parent 8713e2f572
commit 70c0c47889
1 changed files with 16 additions and 14 deletions

View File

@ -1156,6 +1156,7 @@ public class TestPlanService {
if (!CollectionUtils.isEmpty(testPlanTestCases)) {
Long nextTestCaseOrder = ServiceUtils.getNextOrder(targetPlanId, extTestPlanTestCaseMapper::getLastOrder);
for (TestPlanTestCase testCase : testPlanTestCases) {
if (BooleanUtils.isNotTrue(testCase.getIsDel())) {
TestPlanTestCaseWithBLOBs testPlanTestCase = new TestPlanTestCaseWithBLOBs();
testPlanTestCase.setId(UUID.randomUUID().toString());
testPlanTestCase.setPlanId(targetPlanId);
@ -1172,6 +1173,7 @@ public class TestPlanService {
testCaseMapper.insert(testPlanTestCase);
}
}
}
sqlSession.flushStatements();
Set<String> serviceIdSet = DiscoveryUtil.getServiceIdSet();