From 481336a51893bd56b72d55b514360026c67fdb3c Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 18 Nov 2024 18:15:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E7=BB=9F=E8=AE=A1=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E6=97=B6=E9=97=B4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan/controller/TestPlanController.java | 2 +- .../io/metersphere/plan/mapper/ExtTestPlanMapper.java | 2 +- .../io/metersphere/plan/mapper/ExtTestPlanMapper.xml | 4 +++- .../io/metersphere/plan/service/TestPlanService.java | 11 +++-------- .../io/metersphere/plan/controller/TestPlanTests.java | 8 -------- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanController.java index 611c70bd90..ca28aa3344 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanController.java @@ -74,7 +74,7 @@ public class TestPlanController { testPlanCoverageDTO.setErrorCode(109001); return testPlanCoverageDTO; } - return testPlanService.rageByProjectIdAndTimestamp(request.getProjectId(), request.getStartTime(), request.getEndTime()); + return testPlanService.rageByProjectIdAndTimestamp(request.getProjectId()); } @GetMapping("/group-list/{projectId}") diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.java index b6688d653d..cd86ac857d 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.java @@ -94,5 +94,5 @@ public interface ExtTestPlanMapper { */ List getPlanBugList(@Param("projectId") String projectId, @Param("type") String type, @Param("platforms") List platform, @Param("statusList") List statusList); - List selectIdAndStatusByProjectIdAndCreateTimeRangeAndType(@Param("projectId") String projectId, @Param("startTime") long startTime, @Param("endTime") long endTime, @Param("type") String testPlanTypePlan); + List selectIdAndStatusByProjectIdAndCreateTimeRangeAndType(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("type") String testPlanTypePlan); } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml index 946b88f1e2..a0c9ff08c5 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanMapper.xml @@ -872,7 +872,9 @@ SELECT id, status FROM test_plan WHERE project_id = #{projectId} - AND create_time BETWEEN #{startTime} AND #{endTime} + + AND create_time BETWEEN #{startTime} AND #{endTime} + AND type = #{type}