From e7526c0d1d3bb43c0f152f35aca1ce007b7ef128 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Wed, 30 Oct 2024 15:46:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F=E5=90=8E=E5=8F=B0=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=B8=8B=E6=AC=A1=E6=89=A7=E8=A1=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1048138 --user=王旭 【系统设置】系统-系统后台任务-下次执行时间-排序后顺序错误 https://www.tapd.cn/55049933/s/1602187 --- .../system/service/BaseTaskHubService.java | 20 ------------------- .../taskCenter/component/systemTaskTable.vue | 5 +---- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java index 4b305a75fa..4c211c85a3 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java @@ -259,29 +259,9 @@ public class BaseTaskHubService { .flatMap(item -> Stream.of(item.getCreateUserName())) .collect(Collectors.toSet()); Map userMap = userLoginService.getUserNameMap(new ArrayList<>(userSet)); - - List resourceIds = list.stream() - .map(TaskHubScheduleDTO::getResourceId) - .filter(StringUtils::isNotBlank) - .toList(); - - Map trigerTimeMap = Map.of(); - if (CollectionUtils.isNotEmpty(resourceIds)) { - trigerTimeMap = extScheduleMapper.getLastAndNextTime(resourceIds) - .stream() - .collect(Collectors.toMap(TaskHubScheduleDTO::getResourceId, Function.identity())); - } - for (TaskHubScheduleDTO item : list) { item.setCreateUserName(userMap.getOrDefault(item.getCreateUserName(), StringUtils.EMPTY)); item.setOrganizationName(orgMap.getOrDefault(item.getProjectId(), StringUtils.EMPTY)); - if (trigerTimeMap.get(item.getResourceId()) != null) { - item.setNextTime(trigerTimeMap.get(item.getResourceId()).getNextTime()); - item.setLastTime(trigerTimeMap.get(item.getResourceId()).getLastTime()); - } else { - item.setNextTime(item.getNextTime()); - item.setLastTime(item.getLastTime()); - } } } diff --git a/frontend/src/views/taskCenter/component/systemTaskTable.vue b/frontend/src/views/taskCenter/component/systemTaskTable.vue index d8df05d78c..f12b8393b0 100644 --- a/frontend/src/views/taskCenter/component/systemTaskTable.vue +++ b/frontend/src/views/taskCenter/component/systemTaskTable.vue @@ -53,10 +53,6 @@ /> {{ record.value }} -