fix(接口测试): 修复场景引用导入接口用例报错java.lang.IndexOutOfBoundsException的缺陷

--bug=1010655 --user=王孝刚
【接口测试】github#11022,场景引用导入接口用例报错java.lang.IndexOutOfBoundsException
https://www.tapd.cn/55049933/s/1110550
This commit is contained in:
wxg0103 2022-02-25 18:06:33 +08:00 committed by 刘瑞斌
parent 9b8c16bbd9
commit 3b171984ab
1 changed files with 6 additions and 5 deletions

View File

@ -43,11 +43,12 @@ public class RelationshipEdgeService {
example.createCriteria()
.andSourceIdEqualTo(sourceId)
.andTargetIdEqualTo(targetId);
String graphId = relationshipEdgeMapper.selectByExample(example).get(0).getGraphId();
updateGraphId(graphId, sourceId, targetId);
relationshipEdgeMapper.deleteByExample(example);
List<RelationshipEdge> list = relationshipEdgeMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(list)) {
String graphId = relationshipEdgeMapper.selectByExample(example).get(0).getGraphId();
updateGraphId(graphId, sourceId, targetId);
relationshipEdgeMapper.deleteByExample(example);
}
}
public void delete(String sourceId ,List<String> targetIds) {