|
|
@@ -1,11 +1,11 @@
|
|
|
package cn.seecoder.web.service.impl.project;
|
|
|
|
|
|
-import cn.seecoder.web.dao.project.TestCaseMapper;
|
|
|
+import cn.seecoder.web.dao.project.FuncTestCaseMapper;
|
|
|
import cn.seecoder.web.service.project.TestCaseService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import cn.seecoder.web.dao.project.TestStepMapper;
|
|
|
+import cn.seecoder.web.dao.project.FuncTestStepMapper;
|
|
|
import cn.seecoder.web.model.po.project.TestCasePO;
|
|
|
import cn.seecoder.web.model.po.project.TestStepPO;
|
|
|
import cn.seecoder.web.model.vo.project.TestCaseVO;
|
|
|
@@ -22,19 +22,19 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class TestCaseServiceImpl implements TestCaseService {
|
|
|
|
|
|
- private final TestCaseMapper testCaseMapper;
|
|
|
+ private final FuncTestCaseMapper funcTestCaseMapper;
|
|
|
|
|
|
- private final TestStepMapper testStepMapper;
|
|
|
+ private final FuncTestStepMapper funcTestStepMapper;
|
|
|
|
|
|
@Autowired
|
|
|
- public TestCaseServiceImpl(TestCaseMapper testCaseMapper, TestStepMapper testStepMapper) {
|
|
|
- this.testCaseMapper = testCaseMapper;
|
|
|
- this.testStepMapper = testStepMapper;
|
|
|
+ public TestCaseServiceImpl(FuncTestCaseMapper funcTestCaseMapper, FuncTestStepMapper funcTestStepMapper) {
|
|
|
+ this.funcTestCaseMapper = funcTestCaseMapper;
|
|
|
+ this.funcTestStepMapper = funcTestStepMapper;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<TestCaseVO> getTestCases(Integer projectId) {
|
|
|
- return testCaseMapper.selectByProjectId(projectId).stream()
|
|
|
+ return funcTestCaseMapper.selectByProjectId(projectId).stream()
|
|
|
.map(TestCaseVO::new).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
@@ -46,42 +46,42 @@ public class TestCaseServiceImpl implements TestCaseService {
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void createTestCase(Integer projectId, String title) {
|
|
|
- testCaseMapper.insert(TestCasePO.builder().projectId(projectId).title(title).build());
|
|
|
+ funcTestCaseMapper.insert(TestCasePO.builder().projectId(projectId).title(title).build());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void updateTestCaseTitle(Integer testCaseId, String title) {
|
|
|
- testCaseMapper.update(TestCasePO.builder().id(testCaseId).title(title).build());
|
|
|
+ funcTestCaseMapper.update(TestCasePO.builder().id(testCaseId).title(title).build());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void updateTestCaseState(Integer testCaseId, Boolean pass) {
|
|
|
- testCaseMapper.update(TestCasePO.builder().id(testCaseId).pass(pass).build());
|
|
|
+ funcTestCaseMapper.update(TestCasePO.builder().id(testCaseId).pass(pass).build());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void deleteTestCase(Integer testCaseId) {
|
|
|
- testCaseMapper.delete(testCaseId);
|
|
|
+ funcTestCaseMapper.delete(testCaseId);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void createEmptyTestStep(Integer testCaseId) {
|
|
|
- testStepMapper.insert(TestStepPO.builder().description("").testCaseId(testCaseId).build());
|
|
|
+ funcTestStepMapper.insert(TestStepPO.builder().description("").testCaseId(testCaseId).build());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void updateTestStepDescription(Integer testStepId, String description) {
|
|
|
- testStepMapper.insert(TestStepPO.builder().description(description).id(testStepId).build());
|
|
|
+ funcTestStepMapper.insert(TestStepPO.builder().description(description).id(testStepId).build());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void deleteTestStep(Integer testStepId) {
|
|
|
- testStepMapper.delete(testStepId);
|
|
|
+ funcTestStepMapper.delete(testStepId);
|
|
|
}
|
|
|
}
|