From 086a1e50bb731fccb6315f71b12699d1ecc37ae2 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 19 Jan 2021 16:30:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E5=90=8D=E7=A7=B0=E6=88=96ID=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ext/ExtTestPlanLoadCaseMapper.java | 3 +- .../mapper/ext/ExtTestPlanLoadCaseMapper.xml | 47 ++++++++++--------- .../request/testplan/LoadCaseRequest.java | 1 + .../service/TestPlanLoadCaseService.java | 2 +- .../comonents/load/TestPlanLoadCaseList.vue | 7 ++- 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.java index 688d4621c2..fad4c49e32 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.java @@ -1,6 +1,7 @@ package io.metersphere.base.mapper.ext; import io.metersphere.track.dto.TestPlanLoadCaseDTO; +import io.metersphere.track.request.testplan.LoadCaseRequest; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -8,6 +9,6 @@ import java.util.List; public interface ExtTestPlanLoadCaseMapper { List selectIdsNotInPlan(@Param("projectId") String projectId, @Param("planId") String planId); - List selectTestPlanLoadCaseList(@Param("planId") String planId, @Param("projectId") String projectId); + List selectTestPlanLoadCaseList(@Param("request") LoadCaseRequest request); void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.xml index 26b0f9147d..8c8e030dc9 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanLoadCaseMapper.xml @@ -2,7 +2,9 @@ - update test_plan_load_case tplc set status = #{status} where tplc.load_report_id = #{reportId} + update test_plan_load_case tplc + set status = #{status} + where tplc.load_report_id = #{reportId} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java b/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java index cfc5b7e5dc..a13bb7b7a6 100644 --- a/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java +++ b/backend/src/main/java/io/metersphere/track/request/testplan/LoadCaseRequest.java @@ -11,4 +11,5 @@ import java.util.List; public class LoadCaseRequest extends TestPlanLoadCase { private String projectId; private List caseIds; + private String name; } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanLoadCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanLoadCaseService.java index 58ec34980b..555ceb6fae 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanLoadCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanLoadCaseService.java @@ -50,7 +50,7 @@ public class TestPlanLoadCaseService { } public List list(LoadCaseRequest request) { - return extTestPlanLoadCaseMapper.selectTestPlanLoadCaseList(request.getTestPlanId(), request.getProjectId()); + return extTestPlanLoadCaseMapper.selectTestPlanLoadCaseList(request); } public void relevanceCase(LoadCaseRequest request) { diff --git a/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue index 44c68344d7..f0ccfc853d 100644 --- a/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue @@ -186,12 +186,11 @@ export default { initTable() { console.log('init') this.selectRows = new Set(); - let param = {}; - param.testPlanId = this.planId; + this.condition.testPlanId = this.planId; if (this.selectProjectId && this.selectProjectId !== 'root') { - param.projectId = this.selectProjectId; + this.condition.projectId = this.selectProjectId; } - this.$post("/test/plan/load/case/list/" + this.currentPage + "/" + this.pageSize, param, response => { + this.$post("/test/plan/load/case/list/" + this.currentPage + "/" + this.pageSize, this.condition, response => { let data = response.data; let {itemCount, listObject} = data; this.total = itemCount;