refactor: 移除MenuBeanDto,直接使用MenuBean模型

- 删除了 DMS.Application/DTOs/MenuBeanDto.cs 文件
- 在DTOs中将MenuBeanDto类型替换为MenuBean类型
- 更新了IMenuAppService和IMenuManagementService接口中相关方法的参数和返回值类型
- 修改了MenuAppService、MenuManagementService等服务类的实现
- 在DMS.Core/Models/MenuBean.cs中添加了Children属性以支持菜单树结构
- 更新了WPF层相关的菜单处理逻辑
- 修改了映射配置和视图模型中的菜单对象创建方式
- 这一更改简化了数据模型,消除了DTO与模型之间的重复定义,直接在各层之间使用MenuBean实体。
This commit is contained in:
2025-10-13 20:20:09 +08:00
parent e78a7981e1
commit 816827e5e9
21 changed files with 95 additions and 160 deletions

View File

@@ -1,4 +1,4 @@
using DMS.Application.DTOs;
using DMS.Core.Models;
namespace DMS.Application.Interfaces;
@@ -8,24 +8,24 @@ namespace DMS.Application.Interfaces;
public interface IMenuAppService
{
/// <summary>
/// 异步根据ID获取菜单DTO
/// 异步根据ID获取菜单。
/// </summary>
Task<MenuBeanDto> GetMenuByIdAsync(int id);
Task<MenuBean> GetMenuByIdAsync(int id);
/// <summary>
/// 异步获取所有菜单DTO列表。
/// 异步获取所有菜单列表。
/// </summary>
Task<List<MenuBeanDto>> GetAllMenusAsync();
Task<List<MenuBean>> GetAllMenusAsync();
/// <summary>
/// 异步创建一个新菜单。
/// </summary>
Task<int> CreateMenuAsync(MenuBeanDto menuDto);
Task<int> CreateMenuAsync(MenuBean menu);
/// <summary>
/// 异步更新一个已存在的菜单。
/// </summary>
Task<int> UpdateMenuAsync(MenuBeanDto menuDto);
Task<int> UpdateMenuAsync(MenuBean menu);
/// <summary>
/// 异步删除一个菜单。