|
|
|
@ -88,7 +88,13 @@ namespace Lion.AbpPro.NotificationManagement.Notifications |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual async Task SetBatchReadAsync(SetBatchReadInput input) |
|
|
|
{ |
|
|
|
foreach (var item in input.Ids) |
|
|
|
{ |
|
|
|
await SetReadAsync(new SetReadInput(){Id = item}); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 分页获取消息
|
|
|
|
/// </summary>
|
|
|
|
@ -96,6 +102,16 @@ namespace Lion.AbpPro.NotificationManagement.Notifications |
|
|
|
{ |
|
|
|
var totalCount = await _notificationManager.GetPagingCountAsync(input.Title, input.Content, input.SenderUserId, input.SenderUserName, input.ReceiverUserId, input.ReceiverUserName, input.Read, input.StartReadTime, input.EndReadTime, input.MessageType,input.MessageLevel); |
|
|
|
var list = await _notificationManager.GetPagingListAsync(input.Title, input.Content, input.SenderUserId, input.SenderUserName, input.ReceiverUserId, input.ReceiverUserName, input.Read, input.StartReadTime, input.EndReadTime, input.MessageType,input.MessageLevel, input.PageSize, input.SkipCount); |
|
|
|
// var boardCastNotificationIds = list.Where(e => e.MessageType == MessageType.BroadCast).Select(e => e.Id).ToList();
|
|
|
|
// // 获取通告消息当前用户是否已读
|
|
|
|
// var boardCastNotificationSubscriptions = await _notificationSubscriptionManager.GetListAsync(boardCastNotificationIds, CurrentUser.GetId());
|
|
|
|
// foreach (var item in list)
|
|
|
|
// {
|
|
|
|
// var sub = boardCastNotificationSubscriptions.FirstOrDefault(e => e.NotificationId == item.Id);
|
|
|
|
// item.Read = sub != null;
|
|
|
|
// item.ReceiveUserId = sub?.ReceiveUserId;
|
|
|
|
// item.ReceiveUserName = sub?.ReceiveUserName;
|
|
|
|
// }
|
|
|
|
return new PagedResultDto<PagingNotificationOutput>(totalCount, ObjectMapper.Map<List<NotificationDto>, List<PagingNotificationOutput>>(list)); |
|
|
|
} |
|
|
|
|
|
|
|
|