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;