fix(测试跟踪): 修复复制测试计划时里面接口测试顺序不对的问题
--bug=1020633 --user=宋天阳 【测试跟踪】github #20421,复制测试计划,里面关联的接口测试顺序与原测试计划的关联接口测试顺序不一致。 https://www.tapd.cn/55049933/s/1317058
This commit is contained in:
parent
e6121017d0
commit
6d9e08172f
|
@ -621,7 +621,6 @@ public class TestPlanApiCaseService {
|
||||||
List<TestPlanApiCase> testPlanApiCases = testPlanApiCaseMapper.selectByExample(testPlanApiCaseExample);
|
List<TestPlanApiCase> testPlanApiCases = testPlanApiCaseMapper.selectByExample(testPlanApiCaseExample);
|
||||||
TestPlanApiCaseMapper apiCaseMapper = sqlSession.getMapper(TestPlanApiCaseMapper.class);
|
TestPlanApiCaseMapper apiCaseMapper = sqlSession.getMapper(TestPlanApiCaseMapper.class);
|
||||||
if (!CollectionUtils.isEmpty(testPlanApiCases)) {
|
if (!CollectionUtils.isEmpty(testPlanApiCases)) {
|
||||||
Long nextApiOrder = ServiceUtils.getNextOrder(targetPlanId, extTestPlanApiCaseMapper::getLastOrder);
|
|
||||||
for (TestPlanApiCase apiCase : testPlanApiCases) {
|
for (TestPlanApiCase apiCase : testPlanApiCases) {
|
||||||
TestPlanApiCase api = new TestPlanApiCase();
|
TestPlanApiCase api = new TestPlanApiCase();
|
||||||
api.setId(UUID.randomUUID().toString());
|
api.setId(UUID.randomUUID().toString());
|
||||||
|
@ -631,8 +630,7 @@ public class TestPlanApiCaseService {
|
||||||
api.setCreateTime(System.currentTimeMillis());
|
api.setCreateTime(System.currentTimeMillis());
|
||||||
api.setUpdateTime(System.currentTimeMillis());
|
api.setUpdateTime(System.currentTimeMillis());
|
||||||
api.setCreateUser(SessionUtils.getUserId());
|
api.setCreateUser(SessionUtils.getUserId());
|
||||||
api.setOrder(nextApiOrder);
|
api.setOrder(apiCase.getOrder());
|
||||||
nextApiOrder += 5000;
|
|
||||||
apiCaseMapper.insert(api);
|
apiCaseMapper.insert(api);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -711,7 +711,6 @@ public class TestPlanScenarioCaseService {
|
||||||
List<TestPlanApiScenario> apiScenarios = testPlanApiScenarioMapper.selectByExampleWithBLOBs(testPlanApiScenarioExample);
|
List<TestPlanApiScenario> apiScenarios = testPlanApiScenarioMapper.selectByExampleWithBLOBs(testPlanApiScenarioExample);
|
||||||
TestPlanApiScenarioMapper apiScenarioMapper = sqlSession.getMapper(TestPlanApiScenarioMapper.class);
|
TestPlanApiScenarioMapper apiScenarioMapper = sqlSession.getMapper(TestPlanApiScenarioMapper.class);
|
||||||
if (!CollectionUtils.isEmpty(apiScenarios)) {
|
if (!CollectionUtils.isEmpty(apiScenarios)) {
|
||||||
Long nextScenarioOrder = ServiceUtils.getNextOrder(targetPlanId, extTestPlanScenarioCaseMapper::getLastOrder);
|
|
||||||
for (TestPlanApiScenario apiScenario : apiScenarios) {
|
for (TestPlanApiScenario apiScenario : apiScenarios) {
|
||||||
TestPlanApiScenario planScenario = new TestPlanApiScenario();
|
TestPlanApiScenario planScenario = new TestPlanApiScenario();
|
||||||
planScenario.setId(UUID.randomUUID().toString());
|
planScenario.setId(UUID.randomUUID().toString());
|
||||||
|
@ -724,8 +723,7 @@ public class TestPlanScenarioCaseService {
|
||||||
planScenario.setCreateTime(System.currentTimeMillis());
|
planScenario.setCreateTime(System.currentTimeMillis());
|
||||||
planScenario.setUpdateTime(System.currentTimeMillis());
|
planScenario.setUpdateTime(System.currentTimeMillis());
|
||||||
planScenario.setCreateUser(SessionUtils.getUserId());
|
planScenario.setCreateUser(SessionUtils.getUserId());
|
||||||
planScenario.setOrder(nextScenarioOrder);
|
planScenario.setOrder(apiScenario.getOrder());
|
||||||
nextScenarioOrder += 5000;
|
|
||||||
apiScenarioMapper.insert(planScenario);
|
apiScenarioMapper.insert(planScenario);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue