fix(测试计划): 关联无责任人用例时报错#1005374

--bug=1005374 --user=lyh【github#4960】导入的用例无责任人时无法在计划中进行关联
https://www.tapd.cn/55049933/s/1028453
This commit is contained in:
shiziyuan9527 2021-07-23 15:05:54 +08:00 committed by 刘瑞斌
parent d5cea3b0bb
commit 297a760f9e
1 changed files with 2 additions and 1 deletions

View File

@ -461,7 +461,8 @@ public class TestPlanService {
TestCaseExample testCaseExample = new TestCaseExample();
testCaseExample.createCriteria().andIdIn(testCaseIds);
List<TestCase> testCaseList = testCaseMapper.selectByExample(testCaseExample);
Map<String, String> userMap = testCaseList.stream().collect(Collectors.toMap(TestCase::getId, TestCase::getMaintainer));
Map<String, String> userMap = testCaseList.stream()
.collect(HashMap::new, (m,v)-> m.put(v.getId(), v.getMaintainer()), HashMap::putAll);
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
TestPlanTestCaseMapper batchMapper = sqlSession.getMapper(TestPlanTestCaseMapper.class);