mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
fix:定时判断通知人是否重复
This commit is contained in:
parent
d87aad20b1
commit
0941dc971e
@ -70,7 +70,7 @@ public class NoticeService {
|
|||||||
|
|
||||||
private void checkUserIdExist(String userId, MessageDetail list) {
|
private void checkUserIdExist(String userId, MessageDetail list) {
|
||||||
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(list.getOrganizationId());
|
||||||
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"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user