refactor: 性能测试删除指定版本

This commit is contained in:
CaptainB 2022-01-20 15:29:54 +08:00 committed by song-tianyang
parent 5fe5939086
commit 220fe2775d
2 changed files with 2 additions and 6 deletions

View File

@ -1024,10 +1024,6 @@ public class PerformanceTestService {
public void deleteLoadTestByVersion(String version,String refId) { public void deleteLoadTestByVersion(String version,String refId) {
LoadTestExample loadTestExample = new LoadTestExample(); LoadTestExample loadTestExample = new LoadTestExample();
loadTestExample.createCriteria().andRefIdEqualTo(refId).andVersionIdEqualTo(version); loadTestExample.createCriteria().andRefIdEqualTo(refId).andVersionIdEqualTo(version);
List<LoadTest> loadTests = loadTestMapper.selectByExample(loadTestExample); loadTestMapper.deleteByExample(loadTestExample);
LoadTest loadTest = loadTests.get(0);
DeleteTestPlanRequest request = new DeleteTestPlanRequest();
request.setId(loadTest.getId());
this.delete(request);
} }
} }

View File

@ -261,7 +261,7 @@ export default {
}, },
_handleDelete(test, deleteCurrentVersion) { _handleDelete(test, deleteCurrentVersion) {
if (deleteCurrentVersion) { if (deleteCurrentVersion) {
this.$get('performance/delete/' + test.id + '/' + test.refId, () => { this.$get('performance/delete/' + test.versionId + '/' + test.refId, () => {
this.$success(this.$t('commons.delete_success')); this.$success(this.$t('commons.delete_success'));
this.initTableData(); this.initTableData();
this.$refs.apiDeleteConfirm.close(); this.$refs.apiDeleteConfirm.close();