Commit d8d0e371 authored by 高滢's avatar 高滢

测试场景 类型 接口

parent dd6ef37d
package com.ruoyi.web;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.Sample;
import com.ruoyi.domain.TestScenario;
import com.ruoyi.service.ITestScenarioService;
import com.ruoyi.web.request.TestScenarioRequest;
import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/system/scenario")
public class TestScenarioController extends BaseController {
@Autowired
private ITestScenarioService testScenarioService;
/**
* 测试场景分页
*/
@ApiOperation("查询测试场景分页查询")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getList")
public TableDataInfo list(@Validated @RequestBody TestScenarioRequest testScenarioRequest){
startPage();
List<TestScenario> list = testScenarioService.selectTestScenarioList(testScenarioRequest);
return getDataTable(list);
}
/**
* 测试场景列表不分页
*/
@ApiOperation("查询测试场景")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getListAll")
public R<List<TestScenario>> listAll(@Validated @RequestBody TestScenarioRequest testScenarioRequest){
return R.ok(testScenarioService.selectTestScenarioList(testScenarioRequest));
}
}
package com.ruoyi.web;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.TestScenario;
import com.ruoyi.domain.TestType;
import com.ruoyi.service.ITestTypeService;
import com.ruoyi.web.request.TestScenarioRequest;
import com.ruoyi.web.request.TestTypeRequest;
import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/system/type")
public class TestTypeController extends BaseController {
@Autowired
private ITestTypeService testTypeService;
/**
* 测试场景分页
*/
@ApiOperation("查询测试场景分页查询")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getList")
public TableDataInfo list(@Validated @RequestBody TestTypeRequest testTypeRequest){
startPage();
List<TestType> list = testTypeService.selectTestTypeList(testTypeRequest);
return getDataTable(list);
}
/**
* 测试场景列表不分页
*/
@ApiOperation("查询测试场景")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getListAll")
public R<List<TestType>> listAll(@Validated @RequestBody TestTypeRequest testTypeRequest){
return R.ok(testTypeService.selectTestTypeList(testTypeRequest));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment