From 220fe2775d74caa5a6178cbc66e3ed00a5d5fa84 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 20 Jan 2022 15:29:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=88=A0=E9=99=A4=E6=8C=87=E5=AE=9A=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/service/PerformanceTestService.java | 6 +----- .../components/performance/test/PerformanceTestList.vue | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java index 3d5ddfe5fb..5c4818cd13 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java @@ -1024,10 +1024,6 @@ public class PerformanceTestService { public void deleteLoadTestByVersion(String version,String refId) { LoadTestExample loadTestExample = new LoadTestExample(); loadTestExample.createCriteria().andRefIdEqualTo(refId).andVersionIdEqualTo(version); - List loadTests = loadTestMapper.selectByExample(loadTestExample); - LoadTest loadTest = loadTests.get(0); - DeleteTestPlanRequest request = new DeleteTestPlanRequest(); - request.setId(loadTest.getId()); - this.delete(request); + loadTestMapper.deleteByExample(loadTestExample); } } diff --git a/frontend/src/business/components/performance/test/PerformanceTestList.vue b/frontend/src/business/components/performance/test/PerformanceTestList.vue index f4409930fe..e20b08fb24 100644 --- a/frontend/src/business/components/performance/test/PerformanceTestList.vue +++ b/frontend/src/business/components/performance/test/PerformanceTestList.vue @@ -261,7 +261,7 @@ export default { }, _handleDelete(test, 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.initTableData(); this.$refs.apiDeleteConfirm.close();