bugfix:修复Mqtt服务器详情页变量值不更新的问题,修复修改Mqtt别名后台不更新的问题,重新调整了别名的架构
This commit is contained in:
7
DMS.Core/Enums/MqttAliasPropertyType.cs
Normal file
7
DMS.Core/Enums/MqttAliasPropertyType.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace DMS.Core.Enums;
|
||||
|
||||
public enum MqttAliasPropertyType
|
||||
{
|
||||
Alias,
|
||||
All
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public interface IRepositoryManager : IDisposable
|
||||
/// <summary>
|
||||
/// 获取变量MQTT别名仓储的实例。
|
||||
/// </summary>
|
||||
IVariableMqttAliasRepository VariableMqttAliases { get; set; }
|
||||
IVariableMqttAliasRepository MqttAliases { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取菜单仓储的实例。
|
||||
|
||||
@@ -6,15 +6,6 @@ namespace DMS.Core.Interfaces.Repositories
|
||||
{
|
||||
public interface IVariableMqttAliasRepository : IBaseRepository<MqttAlias>
|
||||
{
|
||||
/// <summary>
|
||||
/// 异步获取指定变量的所有MQTT别名关联。
|
||||
/// </summary>
|
||||
Task<List<MqttAlias>> GetAliasesForVariableAsync(int variableId);
|
||||
|
||||
/// <summary>
|
||||
/// 异步根据变量和服务器获取别名关联。
|
||||
/// </summary>
|
||||
Task<MqttAlias> GetByVariableAndServerAsync(int variableId, int mqttServerId);
|
||||
|
||||
/// <summary>
|
||||
/// 异步获取所有变量与MQTT别名关联。
|
||||
|
||||
@@ -35,4 +35,16 @@ public class MqttAlias
|
||||
/// 关联的MQTT服务器导航属性。
|
||||
/// </summary>
|
||||
public MqttServer MqttServer { get; set; }
|
||||
|
||||
public MqttAlias()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public MqttAlias(int variableId, int mqttServerId, string alias)
|
||||
{
|
||||
VariableId = variableId;
|
||||
MqttServerId = mqttServerId;
|
||||
Alias = alias;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user