1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.ruoyi.web;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.TestUseCase;
import com.ruoyi.service.TestUseCaseService;
import com.ruoyi.web.request.TestUserCaseRequest;
import io.swagger.annotations.Api;
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;
@Api(tags = "测试用例")
@RestController
@RequestMapping("/system/testCase")
public class TestUserCaseController extends BaseController{
@Autowired
private TestUseCaseService testUseCaseService;
@ApiOperation("查询测试用例分页查询")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getList")
public TableDataInfo<TestUseCase> listPage(@Validated @RequestBody TestUserCaseRequest testUserCaseRequest){
startPage(testUserCaseRequest);
List<TestUseCase> list = testUseCaseService.selectseCaseList(testUserCaseRequest);
return getDataTable(list);
}
}