Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
d8d0e371
Commit
d8d0e371
authored
Feb 18, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试场景 类型 接口
parent
dd6ef37d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
0 deletions
+108
-0
TestScenarioController.java
...w/src/main/java/com/ruoyi/web/TestScenarioController.java
+54
-0
TestTypeController.java
...eview/src/main/java/com/ruoyi/web/TestTypeController.java
+54
-0
No files found.
quality-review/src/main/java/com/ruoyi/web/TestScenarioController.java
0 → 100644
View file @
d8d0e371
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
));
}
}
quality-review/src/main/java/com/ruoyi/web/TestTypeController.java
0 → 100644
View file @
d8d0e371
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
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment