Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
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
中汽研标准应用数据库
car-database-api
Commits
10b09108
Commit
10b09108
authored
Dec 13, 2024
by
yuanshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/12/13接口修改
获取测试用例sql修改
parent
384683d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
9 deletions
+43
-9
TestUseCaseServiceImpl.java
...n/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
+3
-3
TestUseCaseMapper.xml
...ty-review/src/main/resources/mapper/TestUseCaseMapper.xml
+40
-6
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
View file @
10b09108
...
...
@@ -462,10 +462,10 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
}
@Override
public
NewTestUserCaseListResponseNew
getCaseListNewNew
(
ReviewStandardListByPageRequest
request
)
{
public
NewTestUserCaseListResponseNew
getCaseListNewNew
(
ReviewStandardListByPageRequest
request
)
{
NewTestUserCaseListResponseNew
caseResponse
=
new
NewTestUserCaseListResponseNew
();
List
<
NewStandardVONew
>
newStandardVOList
=
testUseCaseMapper
.
getSandardList
(
request
);
for
(
NewStandardVONew
newStandardVO
:
newStandardVOList
){
/*
for (NewStandardVONew newStandardVO : newStandardVOList){
Long id = Long.parseLong(newStandardVO.getId());
List<NewScenarioUseCasesVONew> scenarioUseCasesVOList = testUseCaseMapper.getScenarioList(id);
newStandardVO.setScenarioUseCases(scenarioUseCasesVOList);
...
...
@@ -474,7 +474,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
List<UseCaseNewVO> useCaseNewVOList = testUseCaseMapper.getUsecaseList(newScenarioUseCasesVONew.getId());
newScenarioUseCasesVONew.setUseCases(useCaseNewVOList);
}
}
}
*/
caseResponse
.
setUseCases
(
newStandardVOList
);
return
caseResponse
;
}
...
...
quality-review/src/main/resources/mapper/TestUseCaseMapper.xml
View file @
10b09108
...
...
@@ -84,11 +84,35 @@
from
t_test_usecase
</select>
<select
id=
"getSandardList"
resultType=
"com.ruoyi.domain.vo.NewStandardVONew"
>
select id,
chapter as serialNumber,
text as requirements
from t_review_standard
<resultMap
id=
"StandardResultMap"
type=
"com.ruoyi.domain.vo.NewStandardVONew"
>
<id
property=
"id"
column=
"standardId"
/>
<result
property=
"serialNumber"
column=
"serialNumber"
/>
<result
property=
"requirements"
column=
"requirements"
/>
<collection
property=
"scenarioUseCases"
ofType=
"com.ruoyi.domain.vo.NewScenarioUseCasesVONew"
>
<id
property=
"id"
column=
"testScenarioId"
/>
<result
property=
"testScenario"
column=
"testScenario"
/>
<collection
property=
"useCases"
ofType=
"com.ruoyi.domain.vo.UseCaseNewVO"
>
<id
property=
"id"
column=
"usecaseId"
/>
<result
property=
"customizedID"
column=
"customizedID"
/>
<result
property=
"description"
column=
"description"
/>
</collection>
</collection>
</resultMap>
<select
id=
"getSandardList"
resultMap=
"StandardResultMap"
>
select trs.id as standardId,
trs.chapter as serialNumber,
trs.text as requirements,
tuts.id as testScenarioId,
tuts.test_scenario as testScenario,
tud.id as usecaseId,
tud.customized_id as customizedID,
tud.description as description
from t_review_standard trs
left join t_usecase_test_scenario tuts on trs.id = tuts.standard_id
left join t_usecase_details tud on tuts.id = tud.test_scenario_id
<where>
<if
test=
"chapter != null and chapter != ''"
>
and chapter like concat('%', #{chapter}, '%')
...
...
@@ -106,7 +130,17 @@
and name = #{name}
</if>
</where>
-- 对 chapter 进行数字分段排序
ORDER BY
CAST(SUBSTRING_INDEX(trs.chapter, '.', 1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(trs.chapter, '.', 2), '.', -1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(trs.chapter, '.', 3), '.', -1) AS UNSIGNED),
tuts.id asc,
-- 对 customizedID 的主编号进行数字分段排序
CAST(SUBSTRING_INDEX(tud.customized_id, '-', 1) AS UNSIGNED) asc,
-- 对 customizedID 的子编号进行数值排序
CAST(SUBSTRING_INDEX(tud.customized_id, '-', -1) AS UNSIGNED) asc,
tud.id asc
</select>
<select
id=
"getScenarioList"
resultType=
"com.ruoyi.domain.vo.NewScenarioUseCasesVONew"
>
select id,
...
...
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