Commit a15f4dd8 authored by wdy's avatar wdy

科恩获取树状测试用例数量

parent dc74ac4e
......@@ -308,7 +308,13 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
// 获取测试用例
if (jsonObject.getJSONObject("data").getJSONObject("regulationByName") != null) {
List<StandardNewVO> list = jsonObject.getJSONObject("data").getJSONObject("regulationByName").getJSONObject("items").getList("nodes", StandardNewVO.class);
Integer useCaseNum = 0;
for(StandardNewVO vo : list) {
if (!vo.getUseCases().isEmpty()) {
useCaseNum += vo.getUseCases().size();
}
}
userCaseResponse.setUseCaseNum(useCaseNum);
userCaseResponse.setUseCases(list);
// 获取总条数
Integer totalCount = (Integer) jsonObject.getJSONObject("data").getJSONObject("regulationByName").getJSONObject("items").get("totalCount");
......
......@@ -17,4 +17,7 @@ public class TestUserCaseListNewResponse {
@ApiModelProperty("总条数")
Integer totalCount;
@ApiModelProperty("用例总条数")
Integer useCaseNum;
}
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