Asoka.Wang 2b3f9acdce 123
2025-09-22 19:09:47 +08:00

96 lines
3.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Threading.Tasks;
using System.Collections.Generic;
using NPP.SmartSchedue.Api.Contracts.Services.Notification.Input;
using NPP.SmartSchedue.Api.Contracts.Services.Notification.Output;
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification;
/// <summary>
/// 系统消息服务接口
/// 决策点1基础通知方式 - 系统消息通知
/// </summary>
public interface ISystemMessageService
{
#region
/// <summary>
/// 发送系统消息
/// </summary>
/// <param name="input">发送系统消息输入模型</param>
/// <returns>发送结果</returns>
Task<SendSystemMessageOutput> SendSystemMessageAsync(SendSystemMessageInput input);
/// <summary>
/// 发送带操作按钮的系统消息
/// </summary>
/// <param name="input">发送带操作按钮的系统消息输入模型</param>
/// <returns>发送结果</returns>
Task<SendSystemMessageOutput> SendSystemMessageWithActionsAsync(SendSystemMessageWithActionsInput input);
#endregion
#region
/// <summary>
/// 批量发送系统消息
/// </summary>
/// <param name="input">批量发送系统消息输入模型</param>
/// <returns>批量发送结果</returns>
Task<BatchSendSystemMessageOutput> BatchSendSystemMessageAsync(BatchSendSystemMessageInput input);
/// <summary>
/// 个性化批量发送系统消息
/// 每个收件人可以有不同的消息内容
/// </summary>
/// <param name="messageItems">消息项列表</param>
/// <returns>批量发送结果</returns>
Task<BatchSendSystemMessageOutput> BatchSendPersonalizedSystemMessageAsync(List<SystemMessageItem> messageItems);
#endregion
#region
/// <summary>
/// 使用模板发送系统消息
/// </summary>
/// <param name="input">使用模板发送系统消息输入模型</param>
/// <returns>发送结果</returns>
Task<SendSystemMessageOutput> SendSystemMessageByTemplateAsync(SendSystemMessageByTemplateInput input);
#endregion
#region
/// <summary>
/// 标记消息为已读
/// </summary>
/// <param name="messageId">消息ID</param>
/// <param name="recipientPersonnelId">接收人员ID</param>
/// <returns>操作结果</returns>
Task<SystemMessageStatusOutput> MarkMessageAsReadAsync(long messageId, long recipientPersonnelId);
/// <summary>
/// 批量标记消息为已读
/// </summary>
/// <param name="messageIds">消息ID列表</param>
/// <param name="recipientPersonnelId">接收人员ID</param>
/// <returns>操作结果</returns>
Task<SystemMessageStatusOutput> BatchMarkMessagesAsReadAsync(List<long> messageIds, long recipientPersonnelId);
/// <summary>
/// 删除消息
/// </summary>
/// <param name="messageId">消息ID</param>
/// <param name="recipientPersonnelId">接收人员ID</param>
/// <returns>操作结果</returns>
Task<SystemMessageStatusOutput> DeleteMessageAsync(long messageId, long recipientPersonnelId);
/// <summary>
/// 获取用户未读消息数量
/// </summary>
/// <param name="recipientPersonnelId">接收人员ID</param>
/// <returns>未读消息数量</returns>
Task<int> GetUnreadMessageCountAsync(long recipientPersonnelId);
#endregion
}