refactor: 修改保存用例时返回实体

This commit is contained in:
CaptainB 2022-01-12 19:04:19 +08:00 committed by zhangdahai112
parent 749ca13ed9
commit dbcc791559
2 changed files with 5 additions and 9 deletions

View File

@ -262,7 +262,7 @@ public class TestCaseService {
return testCaseMapper.selectByPrimaryKey(testCaseId);
}
public int editTestCase(TestCaseWithBLOBs testCase) {
public TestCaseWithBLOBs editTestCase(TestCaseWithBLOBs testCase) {
checkTestCustomNum(testCase);
testCase.setUpdateTime(System.currentTimeMillis());
// 更新数据
@ -284,7 +284,8 @@ public class TestCaseService {
testCase.setRefId(oldTestCase.getRefId());
testCaseMapper.insertSelective(testCase);
}
return testCaseMapper.updateByPrimaryKeySelective(testCase);
testCaseMapper.updateByPrimaryKeySelective(testCase);
return testCaseMapper.selectByPrimaryKey(testCase.getId());
}
public TestCaseWithBLOBs checkTestCaseExist(TestCaseWithBLOBs testCase) {
@ -1545,9 +1546,7 @@ public class TestCaseService {
});
}
this.setNode(request);
editTestCase(request);
//saveFollows(request.getId(), request.getFollows());
return testCaseWithBLOBs;
return editTestCase(request);
}
public String editTestCase(EditTestCaseRequest request, List<MultipartFile> files) {

View File

@ -748,9 +748,6 @@ export default {
if (callback) {
callback(this);
}
if (hasLicense()) {
this.getVersionHistory();
}
//
});
}
@ -953,7 +950,7 @@ export default {
create(row) {
//
this.form.versionId = row.id;
this.saveCase();
this.saveCase(this.getVersionHistory);
},
del(row) {
let that = this;