refactor(测试计划): 接口返回值&sql调整
This commit is contained in:
parent
c12cb63fd9
commit
20e365618c
|
@ -66,7 +66,7 @@ public class TestPlanApiCaseController {
|
||||||
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
|
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
|
||||||
public Pager<List<TestPlanApiCasePageResponse>> page(@Validated @RequestBody TestPlanApiCaseRequest request) {
|
public Pager<List<TestPlanApiCasePageResponse>> page(@Validated @RequestBody TestPlanApiCaseRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
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));
|
return PageUtils.setPageInfo(page, testPlanApiCaseService.hasRelateApiCaseList(request, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class TestPlanApiScenarioController {
|
||||||
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
|
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
|
||||||
public Pager<List<TestPlanApiScenarioPageResponse>> page(@Validated @RequestBody TestPlanApiScenarioRequest request) {
|
public Pager<List<TestPlanApiScenarioPageResponse>> page(@Validated @RequestBody TestPlanApiScenarioRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
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));
|
return PageUtils.setPageInfo(page, testPlanApiScenarioService.hasRelateApiScenarioList(request, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,4 +63,7 @@ public class TestPlanDetailResponse extends TestPlanStatisticsResponse implement
|
||||||
|
|
||||||
@Schema(description = "关注标识")
|
@Schema(description = "关注标识")
|
||||||
private Boolean followFlag;
|
private Boolean followFlag;
|
||||||
|
|
||||||
|
@Schema(description = "类型")
|
||||||
|
private String type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.collectionId != null and request.collectionId != ''">
|
<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>
|
</if>
|
||||||
<include refid="filters">
|
<include refid="filters">
|
||||||
<property name="filter" value="request.filter"/>
|
<property name="filter" value="request.filter"/>
|
||||||
|
|
|
@ -473,6 +473,7 @@ public class TestPlanService extends TestPlanBaseUtilsService {
|
||||||
response.setModuleId(testPlan.getModuleId());
|
response.setModuleId(testPlan.getModuleId());
|
||||||
response.setModuleName(moduleName);
|
response.setModuleName(moduleName);
|
||||||
response.setDescription(testPlan.getDescription());
|
response.setDescription(testPlan.getDescription());
|
||||||
|
response.setType(testPlan.getType());
|
||||||
if (StringUtils.equalsIgnoreCase(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_PLAN)) {
|
if (StringUtils.equalsIgnoreCase(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_PLAN)) {
|
||||||
//计划的 其他参数
|
//计划的 其他参数
|
||||||
getGroupName(response, testPlan);
|
getGroupName(response, testPlan);
|
||||||
|
|
Loading…
Reference in New Issue