fix(测试用例): 导入的用例编辑时报错#1005409

--bug=1005409 --user=lyh 导入的用例编辑报错
https://www.tapd.cn/55049933/s/1029101
This commit is contained in:
shiziyuan9527 2021-07-26 14:34:21 +08:00 committed by 刘瑞斌
parent 8e27594fe6
commit a6ae92d275
1 changed files with 10 additions and 8 deletions

View File

@ -1157,6 +1157,7 @@ public class TestCaseService {
List<List<String>> selecteds = request.getSelected(); List<List<String>> selecteds = request.getSelected();
TestCaseTest test = new TestCaseTest(); TestCaseTest test = new TestCaseTest();
LogUtil.info("关联的测试用例:" + selecteds); LogUtil.info("关联的测试用例:" + selecteds);
if (selecteds != null) {
selecteds.forEach(id -> { selecteds.forEach(id -> {
test.setTestType(id.get(0)); test.setTestType(id.get(0));
test.setTestId(id.get(id.size() - 1)); test.setTestId(id.get(id.size() - 1));
@ -1165,6 +1166,7 @@ public class TestCaseService {
test.setTestCaseId(request.getId()); test.setTestCaseId(request.getId());
testCaseTestMapper.insert(test); testCaseTestMapper.insert(test);
}); });
}
// 新选择了一个文件删除原来的文件 // 新选择了一个文件删除原来的文件
List<FileMetadata> updatedFiles = request.getUpdatedFileList(); List<FileMetadata> updatedFiles = request.getUpdatedFileList();