2 3 - 迁移 IMqttServiceManager 接口到 DMS.Core 4 - 在 DataCenterService 中添加 MQTT 服务器和变量别名的加载逻辑 5 - 实现 MqttPublishProcessor 的核心处理逻辑 6 - 为 DTO 和 ViewModel 的 MqttAliases 属性提供默认空列表初始化 7 - 更新 AutoMapper 映射配置以支持 VariableMqttAliasDto
25 lines
853 B
C#
25 lines
853 B
C#
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DMS.Core.Interfaces.Repositories
|
|
{
|
|
public interface IVariableMqttAliasRepository : IBaseRepository<VariableMqttAlias>
|
|
{
|
|
/// <summary>
|
|
/// 异步获取指定变量的所有MQTT别名关联。
|
|
/// </summary>
|
|
Task<List<VariableMqttAlias>> GetAliasesForVariableAsync(int variableId);
|
|
|
|
/// <summary>
|
|
/// 异步根据变量和服务器获取别名关联。
|
|
/// </summary>
|
|
Task<VariableMqttAlias> GetByVariableAndServerAsync(int variableId, int mqttServerId);
|
|
|
|
/// <summary>
|
|
/// 异步获取所有变量与MQTT别名关联。
|
|
/// </summary>
|
|
/// <returns>包含所有变量与MQTT别名关联实体的列表。</returns>
|
|
Task<List<VariableMqttAlias>> GetAllAsync();
|
|
}
|
|
} |