refactor(测试计划): 接口返回值&sql调整

This commit is contained in:
WangXu10 2024-06-14 11:31:05 +08:00 committed by 刘瑞斌
parent c12cb63fd9
commit 20e365618c
5 changed files with 7 additions and 3 deletions

View File

@ -66,7 +66,7 @@ public class TestPlanApiCaseController {
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
public Pager<List<TestPlanApiCasePageResponse>> page(@Validated @RequestBody TestPlanApiCaseRequest request) {
Page<Object> 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));
}

View File

@ -55,7 +55,7 @@ public class TestPlanApiScenarioController {
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
public Pager<List<TestPlanApiScenarioPageResponse>> page(@Validated @RequestBody TestPlanApiScenarioRequest request) {
Page<Object> 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));
}

View File

@ -63,4 +63,7 @@ public class TestPlanDetailResponse extends TestPlanStatisticsResponse implement
@Schema(description = "关注标识")
private Boolean followFlag;
@Schema(description = "类型")
private String type;
}

View File

@ -126,7 +126,7 @@
</foreach>
</if>
<if test="request.collectionId != null and request.collectionId != ''">
and t.test_plan_collection_id = #{request.collectionId}
and test_plan_api_scenario.test_plan_collection_id = #{request.collectionId}
</if>
<include refid="filters">
<property name="filter" value="request.filter"/>

View File

@ -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);