paiban/NPP.SmartSchedue.Api.Contracts/Core/Repositories/INotificationSettingRepository.cs
Developer 058d8edffa 添加通知系统和工作任务分配功能
- 新增通知系统完整架构,包含通知设置、历史记录、任务管理等核心功能
- 实现工作任务分配服务,支持人员和设备的智能分配
- 添加人员分组管理功能,支持灵活的通知目标配置
- 完善相关枚举定义和数据传输对象

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 08:34:01 +08:00

59 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using NPP.SmartSchedue.Api.Contracts.Domain.Notification;
using ZhonTai.Admin.Core.Repositories;
namespace NPP.SmartSchedue.Api.Contracts.Core.Repositories;
/// <summary>
/// 通知设置仓储接口
/// </summary>
public interface INotificationSettingRepository : IRepositoryBase<NotificationSettingEntity>
{
/// <summary>
/// 根据启用状态获取通知设置列表
/// </summary>
/// <param name="enabled">是否启用</param>
/// <returns></returns>
Task<List<NotificationSettingEntity>> GetByEnabledAsync(bool enabled);
/// <summary>
/// 根据人员组ID获取通知设置列表
/// </summary>
/// <param name="personnelGroupId">人员组ID</param>
/// <returns></returns>
Task<List<NotificationSettingEntity>> GetByPersonnelGroupIdAsync(long personnelGroupId);
/// <summary>
/// 根据通知方式获取通知设置列表
/// </summary>
/// <param name="notificationType">通知方式</param>
/// <returns></returns>
Task<List<NotificationSettingEntity>> GetByNotificationTypeAsync(int notificationType);
/// <summary>
/// 根据触发条件获取匹配的通知设置列表
/// </summary>
/// <param name="businessType">业务类型</param>
/// <param name="businessContext">业务上下文数据</param>
/// <returns></returns>
Task<List<NotificationSettingEntity>> GetMatchingNotificationSettingsAsync(
string businessType,
Dictionary<string, object> businessContext);
/// <summary>
/// 检查通知设置名称是否存在
/// </summary>
/// <param name="notificationName">通知名称</param>
/// <param name="excludeId">排除的ID</param>
/// <returns></returns>
Task<bool> ExistsNotificationNameAsync(string notificationName, long? excludeId = null);
/// <summary>
/// 获取需要在当前时间执行的通知设置列表
/// </summary>
/// <param name="currentTime">当前时间</param>
/// <returns></returns>
Task<List<NotificationSettingEntity>> GetActiveNotificationSettingsForTimeAsync(DateTime currentTime);
}