Beispiel #1
0
        /// <summary>
        /// 取得用户通知信息
        /// </summary>
        public async Task <NotificationsPagedResultDto> GetUserNotifications(GetUserNotificationsInput input)
        {
            var currentUserId = AbpSession.ToUserIdentifier();

            var totalCount = await _userNotificationManager
                             .GetUserNotificationCountAsync(currentUserId, input.State);

            var unreadCount = await _userNotificationManager
                              .GetUserNotificationCountAsync(currentUserId, UserNotificationState.Unread);

            var notifications = await _userNotificationManager
                                .GetUserNotificationsAsync(currentUserId, input.State, input.SkipCount, input.MaxResultCount);

            return(new NotificationsPagedResultDto(totalCount, unreadCount, notifications));
        }
Beispiel #2
0
        public async Task <GetNotificationsOutput> GetUserNotifications(GetUserNotificationsInput input)
        {
            var totalCount = await _userNotificationManager.GetUserNotificationCountAsync(
                AbpSession.ToUserIdentifier(), input.State, input.StartDate, input.EndDate
                );

            var unreadCount = await _userNotificationManager.GetUserNotificationCountAsync(
                AbpSession.ToUserIdentifier(), UserNotificationState.Unread, input.StartDate, input.EndDate
                );

            var notifications = await _userNotificationManager.GetUserNotificationsAsync(
                AbpSession.ToUserIdentifier(), input.State, input.SkipCount, input.MaxResultCount, input.StartDate, input.EndDate
                );

            return(new GetNotificationsOutput(totalCount, unreadCount, notifications));
        }
        public async Task <GetNotificationsOutput> GetUserNotifications(GetUserNotificationsInput input)
        {
            var totalCount = await _userNotificationManager.GetUserNotificationCountAsync(
                InfrastructureSession.ToUserIdentifier(), input.State
                );

            var unreadCount = await _userNotificationManager.GetUserNotificationCountAsync(
                InfrastructureSession.ToUserIdentifier(), UserNotificationState.Unread
                );

            var notifications = await _userNotificationManager.GetUserNotificationsAsync(
                InfrastructureSession.ToUserIdentifier(), input.State, input.SkipCount, input.PageSize
                );

            return(new GetNotificationsOutput(totalCount, unreadCount, notifications));
        }