diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java index ca43ddee3a..fa07d5ae96 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiCaseController.java @@ -66,7 +66,7 @@ public class TestPlanApiCaseController { @CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan") public Pager> page(@Validated @RequestBody TestPlanApiCaseRequest request) { Page page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), - StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "create_time desc"); + StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "t.pos asc"); return PageUtils.setPageInfo(page, testPlanApiCaseService.hasRelateApiCaseList(request, false)); } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java index 1e3d1f130b..159d2f18be 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanApiScenarioController.java @@ -55,7 +55,7 @@ public class TestPlanApiScenarioController { @CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan") public Pager> page(@Validated @RequestBody TestPlanApiScenarioRequest request) { Page page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), - StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "create_time desc"); + StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "test_plan_api_scenario.pos asc"); return PageUtils.setPageInfo(page, testPlanApiScenarioService.hasRelateApiScenarioList(request, false)); } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanDetailResponse.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanDetailResponse.java index 106161a348..32499ba1b1 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanDetailResponse.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanDetailResponse.java @@ -63,4 +63,7 @@ public class TestPlanDetailResponse extends TestPlanStatisticsResponse implement @Schema(description = "关注标识") private Boolean followFlag; + + @Schema(description = "类型") + private String type; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiScenarioMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiScenarioMapper.xml index fee822cf1f..e2b5b4d9b9 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiScenarioMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiScenarioMapper.xml @@ -126,7 +126,7 @@ - and t.test_plan_collection_id = #{request.collectionId} + and test_plan_api_scenario.test_plan_collection_id = #{request.collectionId} diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java index 452f0e1cda..79bc2b0475 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -473,6 +473,7 @@ public class TestPlanService extends TestPlanBaseUtilsService { response.setModuleId(testPlan.getModuleId()); response.setModuleName(moduleName); response.setDescription(testPlan.getDescription()); + response.setType(testPlan.getType()); if (StringUtils.equalsIgnoreCase(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_PLAN)) { //计划的 其他参数 getGroupName(response, testPlan);