fix(测试计划): 测试计划修改测试点顺序问题

--bug=1046140 --user=王旭 【测试计划】测试规划修改测试点的顺序,没有生效 https://www.tapd.cn/55049933/s/1575480
This commit is contained in:
WangXu10 2024-09-06 14:07:25 +08:00 committed by Craftsman
parent 47d1c4c4eb
commit fcc7fbb9a1
3 changed files with 3 additions and 0 deletions

View File

@ -463,6 +463,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService {
List<BaseTreeNode> returnList = new ArrayList<>();
TestPlanCollectionExample collectionExample = new TestPlanCollectionExample();
collectionExample.createCriteria().andTypeEqualTo(CaseType.API_CASE.getKey()).andParentIdNotEqualTo(ModuleConstants.ROOT_NODE_PARENT_ID).andTestPlanIdEqualTo(testPlanId);
collectionExample.setOrderByClause("pos asc");
List<TestPlanCollection> testPlanCollections = testPlanCollectionMapper.selectByExample(collectionExample);
testPlanCollections.forEach(item -> {
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), Translator.get(item.getName(), item.getName()), CaseType.API_CASE.getKey());

View File

@ -604,6 +604,7 @@ public class TestPlanApiScenarioService extends TestPlanResourceService {
List<BaseTreeNode> returnList = new ArrayList<>();
TestPlanCollectionExample collectionExample = new TestPlanCollectionExample();
collectionExample.createCriteria().andTypeEqualTo(CaseType.SCENARIO_CASE.getKey()).andParentIdNotEqualTo(ModuleConstants.ROOT_NODE_PARENT_ID).andTestPlanIdEqualTo(testPlanId);
collectionExample.setOrderByClause("pos asc");
List<TestPlanCollection> testPlanCollections = testPlanCollectionMapper.selectByExample(collectionExample);
testPlanCollections.forEach(item -> {
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), Translator.get(item.getName(), item.getName()), CaseType.SCENARIO_CASE.getKey());

View File

@ -312,6 +312,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
List<BaseTreeNode> returnList = new ArrayList<>();
TestPlanCollectionExample collectionExample = new TestPlanCollectionExample();
collectionExample.createCriteria().andTypeEqualTo(CaseType.FUNCTIONAL_CASE.getKey()).andParentIdNotEqualTo(ModuleConstants.ROOT_NODE_PARENT_ID).andTestPlanIdEqualTo(testPlanId);
collectionExample.setOrderByClause("pos asc");
List<TestPlanCollection> testPlanCollections = testPlanCollectionMapper.selectByExample(collectionExample);
testPlanCollections.forEach(item -> {
BaseTreeNode baseTreeNode = new BaseTreeNode(item.getId(), Translator.get(item.getName(), item.getName()), CaseType.FUNCTIONAL_CASE.getKey());