refactor:删除MqttServerDto,将使用MqttServerDto的全部转为使用MqttServer

This commit is contained in:
2025-10-06 19:32:45 +08:00
parent c85f89db33
commit 94ad940e03
17 changed files with 174 additions and 222 deletions

View File

@@ -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);
}