t
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestCaseResult;
|
||||
import com.test.test.domain.vo.TestCaseResultVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,7 +27,7 @@ public interface ITestCaseResultService
|
||||
* @param testCaseResult 用例执行报告
|
||||
* @return 用例执行报告集合
|
||||
*/
|
||||
public List<TestCaseResult> selectTestCaseResultList(TestCaseResult testCaseResult);
|
||||
public List<TestCaseResultVO> selectTestCaseResultList(TestCaseResult testCaseResult);
|
||||
|
||||
/**
|
||||
* 查询用例执行报告最小化列表
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package com.test.test.service.impl;
|
||||
|
||||
import com.test.test.domain.TestCaseResult;
|
||||
import com.test.test.domain.vo.TestCaseResultVO;
|
||||
import com.test.test.mapper.TestCaseResultMapper;
|
||||
import com.test.test.mapper.TestCaseStepMapper;
|
||||
import com.test.test.service.ITestCaseResultService;
|
||||
import com.test.test.service.ITestCaseStepService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -22,6 +26,8 @@ public class TestCaseResultServiceImpl implements ITestCaseResultService
|
||||
@Resource
|
||||
private TestCaseResultMapper testCaseResultMapper;
|
||||
|
||||
@Resource
|
||||
private TestCaseStepMapper testCaseStepMapper;
|
||||
/**
|
||||
* 查询用例执行报告
|
||||
*
|
||||
@@ -41,9 +47,16 @@ public class TestCaseResultServiceImpl implements ITestCaseResultService
|
||||
* @return 用例执行报告
|
||||
*/
|
||||
@Override
|
||||
public List<TestCaseResult> selectTestCaseResultList(TestCaseResult testCaseResult)
|
||||
public List<TestCaseResultVO> selectTestCaseResultList(TestCaseResult testCaseResult)
|
||||
{
|
||||
return testCaseResultMapper.selectTestCaseResultList(testCaseResult);
|
||||
List<TestCaseResultVO> list = new ArrayList<TestCaseResultVO>();
|
||||
testCaseResultMapper.selectTestCaseResultList(testCaseResult).forEach(item -> {
|
||||
TestCaseResultVO vo = new TestCaseResultVO();
|
||||
vo.setResult(item);
|
||||
vo.setStep(testCaseStepMapper.selectTestCaseStepById(item.getStepId()));
|
||||
list.add(vo);
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user