refactor:将AppDataCenterService改为AppCenterService,将AppDataStorageService改为AppStorageService,将触发器的增删改成合并

This commit is contained in:
2025-10-18 17:18:09 +08:00
parent 816827e5e9
commit 595139fb02
64 changed files with 1159 additions and 599 deletions

View File

@@ -17,7 +17,7 @@ namespace DMS.WPF.Services;
public class MqttDataService : IMqttDataService
{
private readonly IMapper _mapper;
private readonly IAppDataStorageService _appDataStorageService;
private readonly IAppStorageService _appStorageService;
private readonly IMqttManagementService _mqttManagementService;
private readonly IMenuDataService _menuDataService;
private readonly IMenuManagementService _menuManagementServiceImpl;
@@ -29,10 +29,10 @@ public class MqttDataService : IMqttDataService
/// </summary>
/// <param name="mapper">AutoMapper 实例。</param>
/// <param name="mqttAppService">MQTT应用服务实例。</param>
public MqttDataService(IMapper mapper, IAppDataStorageService appDataStorageService, IMqttManagementService mqttManagementService, IMenuDataService menuDataService, IMenuManagementService menuManagementServiceImpl, IDataStorageService dataStorageService)
public MqttDataService(IMapper mapper, IAppStorageService appStorageService, IMqttManagementService mqttManagementService, IMenuDataService menuDataService, IMenuManagementService menuManagementServiceImpl, IDataStorageService dataStorageService)
{
_mapper = mapper;
_appDataStorageService = appDataStorageService;
_appStorageService = appStorageService;
_mqttManagementService = mqttManagementService;
_menuDataService = menuDataService;
_menuManagementServiceImpl = menuManagementServiceImpl;
@@ -47,7 +47,7 @@ public class MqttDataService : IMqttDataService
try
{
// 加载MQTT服务器数据
foreach (var mqttServer in _appDataStorageService.MqttServers.Values)
foreach (var mqttServer in _appStorageService.MqttServers.Values)
{
_dataStorageService.MqttServers.TryAdd(mqttServer.Id, _mapper.Map<MqttServerItem>(mqttServer));
}