refactor:删除MqttServerDto,将使用MqttServerDto的全部转为使用MqttServer
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using DMS.Application.DTOs;
|
||||
using DMS.Core.Models;
|
||||
|
||||
namespace DMS.Application.Interfaces.Database;
|
||||
@@ -9,29 +8,29 @@ namespace DMS.Application.Interfaces.Database;
|
||||
public interface IMqttAppService
|
||||
{
|
||||
/// <summary>
|
||||
/// 异步根据ID获取MQTT服务器DTO。
|
||||
/// 异步根据ID获取MQTT服务器。
|
||||
/// </summary>
|
||||
Task<MqttServerDto> GetMqttServerByIdAsync(int id);
|
||||
Task<MqttServer> GetMqttServerByIdAsync(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 异步获取所有MQTT服务器DTO列表。
|
||||
/// 异步获取所有MQTT服务器列表。
|
||||
/// </summary>
|
||||
Task<List<MqttServerDto>> GetAllMqttServersAsync();
|
||||
Task<List<MqttServer>> GetAllMqttServersAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 异步创建一个新的MQTT服务器。
|
||||
/// </summary>
|
||||
Task<int> CreateMqttServerAsync(MqttServerDto mqttServerDto);
|
||||
Task<int> CreateMqttServerAsync(MqttServer mqttServer);
|
||||
|
||||
/// <summary>
|
||||
/// 异步更新一个已存在的MQTT服务器。
|
||||
/// </summary>
|
||||
Task UpdateMqttServerAsync(MqttServerDto mqttServerDto);
|
||||
Task UpdateMqttServerAsync(MqttServer mqttServer);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量更新MQTT服务器。
|
||||
/// </summary>
|
||||
Task<int> UpdateMqttServersAsync(List<MqttServerDto> mqttServerDtos);
|
||||
Task<int> UpdateMqttServersAsync(List<MqttServer> mqttServers);
|
||||
|
||||
/// <summary>
|
||||
/// 异步根据ID删除一个MQTT服务器。
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface IAppDataStorageService
|
||||
/// <summary>
|
||||
/// 安全字典,用于存储所有MQTT服务器数据
|
||||
/// </summary>
|
||||
ConcurrentDictionary<int, MqttServerDto> MqttServers { get; }
|
||||
ConcurrentDictionary<int, MqttServer> MqttServers { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 安全字典,用于存储所有日志数据
|
||||
|
||||
@@ -1,33 +1,10 @@
|
||||
using DMS.Application.DTOs;
|
||||
using DMS.Core.Models;
|
||||
|
||||
namespace DMS.Application.Interfaces.Management;
|
||||
|
||||
public interface IMqttManagementService
|
||||
{
|
||||
/// <summary>
|
||||
/// 异步根据ID获取MQTT服务器DTO。
|
||||
/// </summary>
|
||||
Task<MqttServerDto> GetMqttServerByIdAsync(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 异步获取所有MQTT服务器DTO列表。
|
||||
/// </summary>
|
||||
Task<List<MqttServerDto>> GetAllMqttServersAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 异步创建一个新的MQTT服务器。
|
||||
/// </summary>
|
||||
Task<MqttServerDto> CreateMqttServerAsync(MqttServerDto mqttServerDto);
|
||||
|
||||
/// <summary>
|
||||
/// 异步更新一个已存在的MQTT服务器。
|
||||
/// </summary>
|
||||
Task<int> UpdateMqttServerAsync(MqttServerDto mqttServerDto);
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量更新MQTT服务器。
|
||||
/// </summary>
|
||||
Task<int> UpdateMqttServersAsync(List<MqttServerDto> mqttServerDtos);
|
||||
Task<MqttServer> CreateMqttServerAsync(MqttServer mqttServer);
|
||||
|
||||
/// <summary>
|
||||
/// 异步删除一个MQTT服务器。
|
||||
@@ -38,5 +15,8 @@ public interface IMqttManagementService
|
||||
/// 异步批量删除MQTT服务器。
|
||||
/// </summary>
|
||||
Task<bool> DeleteMqttServersAsync(List<int> ids);
|
||||
|
||||
Task<List<MqttServer>> GetAllMqttServersAsync();
|
||||
Task<MqttServer> GetMqttServerByIdAsync(int id);
|
||||
Task<int> UpdateMqttServerAsync(MqttServer mqttServer);
|
||||
Task<int> UpdateMqttServersAsync(List<MqttServer> mqttServers);
|
||||
}
|
||||
Reference in New Issue
Block a user