fix: 修复提交缺陷时可能出现主键冲突的问题
This commit is contained in:
parent
c9bc42bacc
commit
ad685b5a0e
|
@ -172,11 +172,16 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
testCaseIssues.setTestCaseId(testCaseId);
|
testCaseIssues.setTestCaseId(testCaseId);
|
||||||
testCaseIssuesMapper.insert(testCaseIssues);
|
testCaseIssuesMapper.insert(testCaseIssues);
|
||||||
|
|
||||||
// 插入缺陷表
|
IssuesExample issuesExample = new IssuesExample();
|
||||||
Issues issues = new Issues();
|
issuesExample.createCriteria().andIdEqualTo(id)
|
||||||
issues.setId(id);
|
.andPlatformEqualTo(IssuesManagePlatform.Zentao.toString());
|
||||||
issues.setPlatform(IssuesManagePlatform.Zentao.toString());
|
if (issuesMapper.selectByExample(issuesExample).size() <= 0) {
|
||||||
issuesMapper.insert(issues);
|
// 插入缺陷表
|
||||||
|
Issues issues = new Issues();
|
||||||
|
issues.setId(id);
|
||||||
|
issues.setPlatform(IssuesManagePlatform.Zentao.toString());
|
||||||
|
issuesMapper.insert(issues);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue