Compare commits

...

2 Commits

Author SHA1 Message Date
b07edf584a Merge remote-tracking branch 'origin/master' 2025-03-20 07:30:14 +08:00
b3420ecec4 t 2025-03-20 07:30:06 +08:00
2 changed files with 17 additions and 3 deletions

View File

@@ -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);
/**
* 查询用例执行报告最小化列表

View File

@@ -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;
}
/**