feat: 菜单管理重构及MQTT服务器功能增强
This commit is contained in:
@@ -5,7 +5,7 @@ namespace DMS.Application.Interfaces;
|
||||
/// <summary>
|
||||
/// 定义菜单管理相关的应用服务操作。
|
||||
/// </summary>
|
||||
public interface IMenuService
|
||||
public interface IMenuAppService
|
||||
{
|
||||
/// <summary>
|
||||
/// 异步根据ID获取菜单DTO。
|
||||
@@ -25,11 +25,11 @@ public interface IMenuService
|
||||
/// <summary>
|
||||
/// 异步更新一个已存在的菜单。
|
||||
/// </summary>
|
||||
Task UpdateMenuAsync(MenuBeanDto menuDto);
|
||||
Task<int> UpdateMenuAsync(MenuBeanDto menuDto);
|
||||
|
||||
/// <summary>
|
||||
/// 异步删除一个菜单。
|
||||
/// </summary>
|
||||
Task DeleteMenuAsync(int id);
|
||||
Task<bool> DeleteMenuAsync(int id);
|
||||
|
||||
}
|
||||
@@ -120,4 +120,20 @@ public interface IEventService
|
||||
/// <param name="sender">事件发送者</param>
|
||||
/// <param name="e">数据加载完成事件参数</param>
|
||||
void RaiseLoadDataCompleted(object sender, DataLoadCompletedEventArgs e);
|
||||
|
||||
#region 菜单事件
|
||||
|
||||
/// <summary>
|
||||
/// 菜单改变事件
|
||||
/// </summary>
|
||||
event EventHandler<MenuChangedEventArgs> OnMenuChanged;
|
||||
|
||||
/// <summary>
|
||||
/// 触发菜单改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender">事件发送者</param>
|
||||
/// <param name="e">菜单改变事件参数</param>
|
||||
void RaiseMenuChanged(object sender, MenuChangedEventArgs e);
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -22,27 +22,12 @@ public interface IMenuManagementService
|
||||
/// <summary>
|
||||
/// 异步更新一个已存在的菜单。
|
||||
/// </summary>
|
||||
Task UpdateMenuAsync(MenuBeanDto menuDto);
|
||||
Task<int> UpdateMenuAsync(MenuBeanDto menuDto);
|
||||
|
||||
/// <summary>
|
||||
/// 异步删除一个菜单。
|
||||
/// </summary>
|
||||
Task DeleteMenuAsync(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 在内存中添加菜单
|
||||
/// </summary>
|
||||
void AddMenuToMemory(MenuBeanDto menuDto);
|
||||
|
||||
/// <summary>
|
||||
/// 在内存中更新菜单
|
||||
/// </summary>
|
||||
void UpdateMenuInMemory(MenuBeanDto menuDto);
|
||||
|
||||
/// <summary>
|
||||
/// 在内存中删除菜单
|
||||
/// </summary>
|
||||
void RemoveMenuFromMemory(int menuId);
|
||||
Task<bool> DeleteMenuAsync(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 获取根菜单列表
|
||||
@@ -60,4 +45,9 @@ public interface IMenuManagementService
|
||||
/// 构建菜单树结构
|
||||
/// </summary>
|
||||
void BuildMenuTree();
|
||||
|
||||
/// <summary>
|
||||
/// 当菜单数据发生变化时触发
|
||||
/// </summary>
|
||||
event EventHandler<DMS.Application.Events.MenuChangedEventArgs> MenuChanged;
|
||||
}
|
||||
@@ -38,4 +38,5 @@ public interface IMqttManagementService
|
||||
/// 异步批量删除MQTT服务器。
|
||||
/// </summary>
|
||||
Task<bool> DeleteMqttServersAsync(List<int> ids);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user