fix(测试跟踪): 测试计划功能用例不展示自定义字段
--bug=1021234 --user=陈建星 【测试跟踪】测试计划-执行功能用例-多值输入框类型的字段不显示值 https://www.tapd.cn/55049933/s/1319557
This commit is contained in:
parent
695e343968
commit
0bb14f062e
|
@ -303,9 +303,14 @@ public class TestPlanTestCaseService {
|
|||
List<TestCaseTestDTO> testCaseTestDTOS = extTestPlanTestCaseMapper.listTestCaseTest(testPlanCaseDTO.getCaseId());
|
||||
testCaseTestDTOS.forEach(this::setTestName);
|
||||
testPlanCaseDTO.setList(testCaseTestDTOS);
|
||||
buildCustomField(testPlanCaseDTO);
|
||||
return testPlanCaseDTO;
|
||||
}
|
||||
|
||||
private void buildCustomField(TestPlanCaseDTO data) {
|
||||
data.setFields(testCaseService.getCustomFieldByCaseId(data.getCaseId()));
|
||||
}
|
||||
|
||||
private void setTestName(TestCaseTestDTO dto) {
|
||||
String type = dto.getTestType();
|
||||
String id = dto.getTestId();
|
||||
|
|
|
@ -770,8 +770,12 @@ public class TestCaseService {
|
|||
}
|
||||
|
||||
private void buildCustomField(TestCaseDTO data) {
|
||||
data.setFields(getCustomFieldByCaseId(data.getId()));
|
||||
}
|
||||
|
||||
public List<CustomFieldDao> getCustomFieldByCaseId(String caseId) {
|
||||
CustomFieldTestCaseExample example = new CustomFieldTestCaseExample();
|
||||
example.createCriteria().andResourceIdEqualTo(data.getId());
|
||||
example.createCriteria().andResourceIdEqualTo(caseId);
|
||||
List<CustomFieldTestCase> customFieldTestCases = customFieldTestCaseMapper.selectByExampleWithBLOBs(example);
|
||||
List<CustomFieldDao> fields = new ArrayList<>();
|
||||
customFieldTestCases.forEach(i -> {
|
||||
|
@ -781,7 +785,7 @@ public class TestCaseService {
|
|||
customFieldDao.setTextValue(i.getTextValue());
|
||||
fields.add(customFieldDao);
|
||||
});
|
||||
data.setFields(fields);
|
||||
return fields;
|
||||
}
|
||||
|
||||
private void buildProjectInfoWithoutProject(List<TestCaseDTO> resList) {
|
||||
|
|
Loading…
Reference in New Issue