Commit c0830b0f authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'master'

2024/12/13接口修改

See merge request !29
parents 384683d6 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;
}
......
......@@ -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,
......
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