From 6a6bcc381fa1e6ac1dd47f9ccd767db5f0981ad6 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 17 Apr 2024 19:41:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=AD=97=E6=AE=B5=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E9=87=8D=E5=A4=8D=E6=8E=A5=E5=8F=97=E4=BA=BA?= =?UTF-8?q?=E4=BC=9A=E6=94=B6=E9=87=8D=E5=A4=8D=E6=B6=88=E6=81=AF=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8F=91=E9=80=81=E5=A4=B1=E8=B4=A5=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E5=85=B3=E8=81=94=E7=94=A8=E4=BE=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1039613 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039613 --bug=1039606 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039606 --bug=1039578 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039578 --- .../functional/service/FunctionalCaseNoticeService.java | 6 +++--- .../system/notice/sender/AbstractNoticeSender.java | 4 ++-- .../system/notice/utils/MessageTemplateUtils.java | 3 ++- .../src/components/business/ms-case-associate/index.vue | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseNoticeService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseNoticeService.java index 3689f90a64..d68f1026b8 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseNoticeService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseNoticeService.java @@ -154,8 +154,8 @@ public class FunctionalCaseNoticeService { if (customField == null) { continue; } - optionDTO.setId(customField.getId()); - optionDTO.setName(customField.getName()); + optionDTO.setId(customField.getName()); + optionDTO.setName(customFieldDTO.getValue()); fields.add(optionDTO); } } @@ -195,7 +195,7 @@ public class FunctionalCaseNoticeService { } public Map copyBaseCaseInfo(String projectId, List ids) { FunctionalCaseExample example = new FunctionalCaseExample(); - example.createCriteria().andProjectIdEqualTo(projectId).andDeletedEqualTo(false).andIdIn(ids); + example.createCriteria().andProjectIdEqualTo(projectId).andIdIn(ids); List functionalCaseLists = functionalCaseMapper.selectByExample(example); return functionalCaseLists.stream().collect(Collectors.toMap(FunctionalCase::getId, functionalCase -> functionalCase)); } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java index 4c6532b5a0..dacdb9b69b 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java @@ -168,10 +168,10 @@ public abstract class AbstractNoticeSender implements NoticeSender { } // 去重复 - List userIds = toUsers.stream().map(Receiver::getUserId).distinct().toList(); + List userIds = toUsers.stream().map(Receiver::getUserId).toList(); LogUtils.info("userIds: ", JSON.toJSONString(userIds)); List users = getUsers(userIds, messageDetail.getProjectId()); - List realUserIds = users.stream().map(User::getId).toList(); + List realUserIds = users.stream().map(User::getId).distinct().toList(); return toUsers.stream().filter(t -> realUserIds.contains(t.getUserId())).toList(); } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/MessageTemplateUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/MessageTemplateUtils.java index 25c976e6d5..6ae3bece2a 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/MessageTemplateUtils.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/MessageTemplateUtils.java @@ -188,7 +188,8 @@ public class MessageTemplateUtils { // 处理人相关的数据 handleUser(context); StringSubstitutor sub = new StringSubstitutor(context); - return sub.replace(template); + String replace = sub.replace(template); + return replace; } public static void handleTime(Map context) { diff --git a/frontend/src/components/business/ms-case-associate/index.vue b/frontend/src/components/business/ms-case-associate/index.vue index 54312cd507..c3be0d7f50 100644 --- a/frontend/src/components/business/ms-case-associate/index.vue +++ b/frontend/src/components/business/ms-case-associate/index.vue @@ -597,6 +597,7 @@ version: '', }; activeFolder.value = 'all'; + activeFolderName.value = t('ms.case.associate.allCase'); resetSelector(); emit('close'); }