From 9e62022ae909037edb2161eceb190dccb3b494e4 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 26 Nov 2020 11:52:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5=20submodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 57d6f78efa..bb494fc68a 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 57d6f78efa4b0300be188e8b024511ceef0873ed +Subproject commit bb494fc68a2367359c9048fa7250c7618de4afb6 diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 71d57ae5d7..8a972a1987 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 71d57ae5d7f8bb5c93a29504ac6f2300dc189ce9 +Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8 From 0941dc971ea5f99afa9c535034d2b8bb024fc1fe Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Thu, 26 Nov 2020 12:11:36 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=E5=AE=9A=E6=97=B6=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E4=BA=BA=E6=98=AF=E5=90=A6=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/notice/service/NoticeService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java index af3257e0cc..c6299cad34 100644 --- a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -70,7 +70,7 @@ public class NoticeService { private void checkUserIdExist(String userId, MessageDetail list) { MessageTaskExample example = new MessageTaskExample(); - example.createCriteria().andUserIdEqualTo(userId).andEventEqualTo(list.getEvent()).andTypeEqualTo(list.getType()).andTaskTypeEqualTo(list.getTaskType()).andWebhookEqualTo(list.getWebhook()); + example.createCriteria().andUserIdEqualTo(userId).andEventEqualTo(list.getEvent()).andTypeEqualTo(list.getType()).andTaskTypeEqualTo(list.getTaskType()).andWebhookEqualTo(list.getWebhook()).andTestIdEqualTo(list.getTestId()).andOrganizationIdEqualTo(list.getOrganizationId()); if (messageTaskMapper.countByExample(example) > 0) { MSException.throwException(Translator.get("message_task_already_exists")); } @@ -151,4 +151,4 @@ public class NoticeService { example.createCriteria().andIdentificationEqualTo(identification); return messageTaskMapper.deleteByExample(example); } -} \ No newline at end of file +} From 5b2b7fd32225bd11e4effa423ad1be345b6d8a83 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Thu, 26 Nov 2020 12:35:52 +0800 Subject: [PATCH 3/3] fix: --- .../java/io/metersphere/notice/service/NoticeService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java index c6299cad34..0ea8427b8e 100644 --- a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -51,7 +51,7 @@ public class NoticeService { long time = System.currentTimeMillis(); String identification = UUID.randomUUID().toString(); list.getUserIds().forEach(m -> { - checkUserIdExist(m, list); + checkUserIdExist(m, list,orgId); MessageTask message = new MessageTask(); message.setId(UUID.randomUUID().toString()); message.setEvent(list.getEvent()); @@ -68,9 +68,9 @@ public class NoticeService { }); } - private void checkUserIdExist(String userId, MessageDetail list) { + private void checkUserIdExist(String userId, MessageDetail list,String orgId) { MessageTaskExample example = new MessageTaskExample(); - example.createCriteria().andUserIdEqualTo(userId).andEventEqualTo(list.getEvent()).andTypeEqualTo(list.getType()).andTaskTypeEqualTo(list.getTaskType()).andWebhookEqualTo(list.getWebhook()).andTestIdEqualTo(list.getTestId()).andOrganizationIdEqualTo(list.getOrganizationId()); + example.createCriteria().andUserIdEqualTo(userId).andEventEqualTo(list.getEvent()).andTypeEqualTo(list.getType()).andTaskTypeEqualTo(list.getTaskType()).andWebhookEqualTo(list.getWebhook()).andTestIdEqualTo(list.getTestId()).andOrganizationIdEqualTo(orgId); if (messageTaskMapper.countByExample(example) > 0) { MSException.throwException(Translator.get("message_task_already_exists")); }