fix(测试跟踪): 脑图用例添加优先级保存报错

This commit is contained in:
chenjianxing 2022-02-22 16:32:25 +08:00 committed by 刘瑞斌
parent 2c64013d9e
commit c7517df458
3 changed files with 7 additions and 10 deletions

View File

@ -50,7 +50,7 @@ public class ProjectApplicationService {
ProjectApplicationExample projectApplicationExample = new ProjectApplicationExample(); ProjectApplicationExample projectApplicationExample = new ProjectApplicationExample();
projectApplicationExample.createCriteria().andProjectIdEqualTo(projectId).andTypeEqualTo(type); projectApplicationExample.createCriteria().andProjectIdEqualTo(projectId).andTypeEqualTo(type);
List<ProjectApplication> projectApplications = projectApplicationMapper.selectByExample(projectApplicationExample); List<ProjectApplication> projectApplications = projectApplicationMapper.selectByExample(projectApplicationExample);
if(projectApplications==null||projectApplications.size()==0){ if(projectApplications == null || projectApplications.size() == 0){
return new ProjectApplication(); return new ProjectApplication();
} }
return projectApplications.get(0); return projectApplications.get(0);

View File

@ -425,13 +425,7 @@ public class TestCaseService {
.andProjectIdEqualTo(testCase.getProjectId()) .andProjectIdEqualTo(testCase.getProjectId())
.andNodePathEqualTo(nodePath) .andNodePathEqualTo(nodePath)
.andTypeEqualTo(testCase.getType()) .andTypeEqualTo(testCase.getType())
// .andMaintainerEqualTo(testCase.getMaintainer())
.andPriorityEqualTo(testCase.getPriority()); .andPriorityEqualTo(testCase.getPriority());
// .andMethodEqualTo(testCase.getMethod());
// if (StringUtils.isNotBlank(testCase.getNodeId())) {
// criteria.andNodeIdEqualTo(testCase.getTestId());
// }
if (StringUtils.isNotBlank(testCase.getTestId())) { if (StringUtils.isNotBlank(testCase.getTestId())) {
criteria.andTestIdEqualTo(testCase.getTestId()); criteria.andTestIdEqualTo(testCase.getTestId());

View File

@ -341,9 +341,12 @@ name: "TestCaseMinder",
let isChange = false; let isChange = false;
let nodeId = parent ? (parent.newId ? parent.newId : parent.id) : ""; let nodeId = parent ? (parent.newId ? parent.newId : parent.id) : "";
let priorityDefaultValue = (data.priority ? 'P' + data.priority - 1 : let priorityDefaultValue;
(this.testCaseDefaultValue['用例等级'] ? this.testCaseDefaultValue['用例等级'] : 'P' + 0) if (data.priority ) {
); priorityDefaultValue = 'P' + (data.priority - 1);
} else {
priorityDefaultValue = this.testCaseDefaultValue['用例等级'] ? this.testCaseDefaultValue['用例等级'] : 'P' + 0;
}
let testCase = { let testCase = {
id: data.id, id: data.id,