track/src/SJZY.Track.Domain/Aggregates/ForewarningAggregate/IForewarningCacheService.cs
2024-09-07 18:14:17 +08:00

35 lines
1008 B
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 SJZY.Track.Domain.Dtos.Forewarning;
namespace SJZY.Track.Domain.Aggregates.ForewarningAggregate;
public interface IForewarningCacheService
{
/// <summary>
/// 获取预警规则,如果没有则返回null
/// </summary>
/// <param name="subSystemId">子系统id</param>
/// <param name="customerId">客户id</param>
/// <returns></returns>
Task<List<ForewarningRuleCacheEntry>?> GetRulesAsync(int subSystemId, int customerId);
/// <summary>
/// 重置本地缓存
/// </summary>
/// <returns></returns>
Task Clear(ClearRulCacheEvent @event);
/// <summary>
/// 清除redis 缓存
/// </summary>
/// <returns></returns>
Task ClearRedisByAreaId(int areaId);
/// <summary>
/// 清除redis 缓存
/// </summary>
/// <param name="subSystemId">子系统id</param>
/// <param name="customerId">客户id</param>
/// <returns></returns>
Task ClearRedisBySystemIdAndCustomer(int subSystemId, int customerId);
}