This commit is contained in:
chenjianxing 2020-11-26 13:01:22 +08:00
commit c15f3064c0
3 changed files with 6 additions and 6 deletions

View File

@ -51,7 +51,7 @@ public class NoticeService {
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
String identification = UUID.randomUUID().toString(); String identification = UUID.randomUUID().toString();
list.getUserIds().forEach(m -> { list.getUserIds().forEach(m -> {
checkUserIdExist(m, list); checkUserIdExist(m, list,orgId);
MessageTask message = new MessageTask(); MessageTask message = new MessageTask();
message.setId(UUID.randomUUID().toString()); message.setId(UUID.randomUUID().toString());
message.setEvent(list.getEvent()); 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(); 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(orgId);
if (messageTaskMapper.countByExample(example) > 0) { if (messageTaskMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("message_task_already_exists")); MSException.throwException(Translator.get("message_task_already_exists"));
} }
@ -151,4 +151,4 @@ public class NoticeService {
example.createCriteria().andIdentificationEqualTo(identification); example.createCriteria().andIdentificationEqualTo(identification);
return messageTaskMapper.deleteByExample(example); return messageTaskMapper.deleteByExample(example);
} }
} }

@ -1 +1 @@
Subproject commit 57d6f78efa4b0300be188e8b024511ceef0873ed Subproject commit bb494fc68a2367359c9048fa7250c7618de4afb6

@ -1 +1 @@
Subproject commit 71d57ae5d7f8bb5c93a29504ac6f2300dc189ce9 Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8