From c7bfb50fb07e24630b074a723dee53813d8bad2d Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Tue, 26 Nov 2024 11:39:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=88=91=E5=A4=84=E7=90=86=E7=9A=84=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/bug/mapper/ExtBugMapper.java | 2 ++ .../metersphere/bug/mapper/ExtBugMapper.xml | 28 +++++++++++++++++++ .../dashboard/service/DashboardService.java | 7 ++++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java index f921cbebf4..856573c8fd 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java @@ -137,4 +137,6 @@ public interface ExtBugMapper { List projectUserBugStatusCount(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("userIds") List userIds, @Param("platforms") Set platforms); ListgetSimpleList(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("handleUsers") Set handleUsers,@Param("createUser") String createUser, @Param("platforms") Set platforms); + + ListgetByHandleUser(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("localHandleUser") String localHandleUser,@Param("createUser") String createUser,@Param("thirdHandleUser") String thirdHandleUser, @Param("thirdPlatform") String thirdPlatform); } diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml index aa9f41b9c9..c1362f3acc 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml @@ -474,5 +474,33 @@ + + diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java index 9053d1f9ca..33599de35f 100644 --- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java +++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java @@ -1315,7 +1315,12 @@ public class DashboardService { String createUser = hasCreateUser ? userId : null; String platformName = projectApplicationService.getPlatformName(projectId); Set platforms = getPlatforms(platformName); - List allSimpleList = extBugMapper.getSimpleList(projectId, null, null, handleUsers, createUser, platforms); + List allSimpleList; + if (hasHandleUser) { + allSimpleList = extBugMapper.getByHandleUser(projectId, null, null, localHandleUser, createUser, handleUser, platformName); + } else { + allSimpleList= extBugMapper.getSimpleList(projectId, null, null, handleUsers, createUser, platforms); + } List localLastStepStatus = getBugEndStatus(projectId, platformName); List statusList = allSimpleList.stream().filter(t -> !localLastStepStatus.contains(t.getStatus())).toList(); int statusSize = CollectionUtils.isEmpty(statusList) ? 0 : statusList.size();