From 0e8123cbb23f99fc5361ae8b1f5e2293d523f841 Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Wed, 12 Jan 2022 10:40:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92-=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/service/TestCaseService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 678b699bd6..f93540483c 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -267,7 +267,10 @@ public class TestCaseService { testCase.setUpdateTime(System.currentTimeMillis()); // 更新数据 TestCaseExample example = new TestCaseExample(); - example.createCriteria().andIdEqualTo(testCase.getId()).andVersionIdEqualTo(testCase.getVersionId()); + example.createCriteria().andIdEqualTo(testCase.getId()); + if (StringUtils.isNotBlank(testCase.getVersionId())) { + example.getOredCriteria().get(0).andVersionIdEqualTo(testCase.getVersionId()); + } if (testCaseMapper.updateByExampleSelective(testCase, example) == 0) { // 插入新版本的数据 TestCaseWithBLOBs oldTestCase = testCaseMapper.selectByPrimaryKey(testCase.getId()); From c55350f2eccb45c67d57390e661e088c1ae82a4b Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Wed, 12 Jan 2022 13:41:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E6=B5=8B=E8=AF=95=E8=AE=A1?= =?UTF-8?q?=E5=88=92-=E6=8E=A5=E5=8F=A3=EF=BC=8C=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E4=B8=8E=E7=89=88=E6=9C=AC=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/definition/ApiTestCaseRequest.java | 2 - .../mapper/ext/ExtApiDefinitionMapper.xml | 61 +++++++++++++++- .../base/mapper/ext/ExtLoadTestMapper.xml | 6 ++ .../base/mapper/ext/ExtTestCaseMapper.xml | 2 +- .../mapper/ext/ExtTestPlanApiCaseMapper.xml | 70 ++++++++++++++++--- .../mapper/ext/ExtTestPlanLoadCaseMapper.xml | 63 ++++++++++++++++- .../service/PerformanceTestService.java | 12 ++-- .../TestPlanLoadCaseController.java | 3 +- .../TestReviewLoadCaseController.java | 7 +- .../track/dto/TestPlanLoadCaseDTO.java | 2 + .../request/testplan/LoadCaseRequest.java | 3 +- .../service/TestCaseReviewLoadService.java | 3 +- .../service/TestPlanLoadCaseService.java | 5 +- .../scenario/api/RelevanceApiList.vue | 1 - .../comonents/api/TestCaseApiRelevance.vue | 18 ++++- .../comonents/api/TestPlanApiCaseList.vue | 39 ++++++++++- .../comonents/api/TestPlanCaseListHeader.vue | 11 ++- .../comonents/load/TestCaseLoadRelevance.vue | 31 +++++++- .../comonents/load/TestPlanLoadCaseList.vue | 38 +++++++++- .../load/TestPlanLoadCaseListHeader.vue | 15 +++- .../src/common/js/default-table-header.js | 1 + 21 files changed, 356 insertions(+), 37 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java index c0d0093334..45b74c64f2 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/ApiTestCaseRequest.java @@ -33,8 +33,6 @@ public class ApiTestCaseRequest extends BaseQueryRequest { private String reviewId; private String deleteUserId; private long deleteTime; - private String refId; - private String versionId; /** * 检查待更新的(近三天有更新的或者状态为error的) */ diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml index 28a6acbcd0..a9c5ae074a 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml @@ -369,8 +369,35 @@