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
c0e9feae
Commit
c0e9feae
authored
Mar 19, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据车型试验子任务ID获取用例集合
parent
699e7852
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
4 deletions
+63
-4
TestUsecaseVO.java
...view/src/main/java/com/ruoyi/domain/vo/TestUsecaseVO.java
+3
-0
TestUseCaseService.java
...w/src/main/java/com/ruoyi/service/TestUseCaseService.java
+8
-0
TestUseCaseServiceImpl.java
...n/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
+9
-0
TestUserCaseController.java
...w/src/main/java/com/ruoyi/web/TestUserCaseController.java
+16
-4
TestUseCaseIdListRequest.java
.../java/com/ruoyi/web/request/TestUseCaseIdListRequest.java
+26
-0
TestUseCaseMapper.xml
...ty-review/src/main/resources/mapper/TestUseCaseMapper.xml
+1
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/vo/TestUsecaseVO.java
View file @
c0e9feae
...
...
@@ -18,6 +18,9 @@ import lombok.NoArgsConstructor;
@ApiModel
(
"测试用例VO(t_test_usecase)"
)
public
class
TestUsecaseVO
{
@ApiModelProperty
(
"测试用例ID"
)
private
Long
id
;
@ApiModelProperty
(
"测试场景"
)
private
String
testScenario
;
...
...
quality-review/src/main/java/com/ruoyi/service/TestUseCaseService.java
View file @
c0e9feae
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.service;
import
com.ruoyi.domain.TestUseCase
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.web.request.TestUseCaseIdListRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
java.util.List
;
...
...
@@ -19,4 +20,11 @@ public interface TestUseCaseService extends IService<TestUseCase> {
* @return 测试用例集合
*/
public
List
<
TestUseCase
>
selectseCaseList
(
TestUserCaseRequest
testUserCaseRequest
);
/**
* 通过车型试验ID获取所绑定的测试用例
* @param request
* @return
*/
List
<
Long
>
selectCaseIdList
(
TestUseCaseIdListRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
View file @
c0e9feae
...
...
@@ -2,14 +2,17 @@ package com.ruoyi.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.TestUseCase
;
import
com.ruoyi.domain.vo.TestUsecaseVO
;
import
com.ruoyi.service.TestUseCaseService
;
import
com.ruoyi.mapper.TestUseCaseMapper
;
import
com.ruoyi.web.request.TestUseCaseIdListRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author wangfei
...
...
@@ -37,6 +40,12 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
return
testUseCaseMapper
.
selectseCaseList
(
testUserCaseRequest
);
}
@Override
public
List
<
Long
>
selectCaseIdList
(
TestUseCaseIdListRequest
request
)
{
List
<
TestUsecaseVO
>
list
=
testUseCaseMapper
.
selectListByTaskId
(
request
.
getModelTestId
());
return
list
.
stream
().
map
(
TestUsecaseVO:
:
getId
).
collect
(
Collectors
.
toList
());
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/TestUserCaseController.java
View file @
c0e9feae
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.annotation.Anonymous
;
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.TestUseCase
;
import
com.ruoyi.service.TestUseCaseService
;
import
com.ruoyi.web.request.TestUseCaseIdListRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -11,10 +14,7 @@ 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
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
...
...
@@ -35,4 +35,16 @@ public class TestUserCaseController extends BaseController{
List
<
TestUseCase
>
list
=
testUseCaseService
.
selectseCaseList
(
testUserCaseRequest
);
return
getDataTable
(
list
);
}
/**
* 通过车型试验ID获取所绑定的测试用例
* @param request
* @return
*/
@Anonymous
@ApiOperation
(
"根据场景查询用例ID集合"
)
@PostMapping
(
"/getCaseIdList"
)
public
R
<
List
<
Long
>>
getCaseIdList
(
@Validated
@RequestBody
TestUseCaseIdListRequest
request
)
{
return
R
.
ok
(
testUseCaseService
.
selectCaseIdList
(
request
));
}
}
quality-review/src/main/java/com/ruoyi/web/request/TestUseCaseIdListRequest.java
0 → 100644
View file @
c0e9feae
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotNull
;
/**
* @author gxk
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"测试用例id列表"
)
public
class
TestUseCaseIdListRequest
{
@NotNull
(
message
=
"车型试验ID不为空"
)
@ApiModelProperty
(
"车型试验ID"
)
private
Long
modelTestId
;
}
quality-review/src/main/resources/mapper/TestUseCaseMapper.xml
View file @
c0e9feae
...
...
@@ -50,6 +50,7 @@
<select
id=
"selectListByTaskId"
resultType=
"com.ruoyi.domain.vo.TestUsecaseVO"
>
select
tu.id,
ts.test_scenario testScenario,
tt.test_type testType,
tu.usecase_no usecaseNo,
...
...
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