feat: 完成菜单接入

This commit is contained in:
橙子
2024-09-07 13:43:00 +08:00
parent 978a7fab4c
commit 40b5f33c4e
12 changed files with 41 additions and 18 deletions

View File

@@ -24,5 +24,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
public string? Component { get; set; }
public string? Query { get; set; }
public int OrderNum { get; set; }
public MenuSourceEnum MenuSource { get; set; } = MenuSourceEnum.Ruoyi;
public string? RouterName { get; set; }
}
}

View File

@@ -1,4 +1,5 @@
using Volo.Abp.Application.Dtos;
using Yi.Framework.Rbac.Domain.Shared.Enums;
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
{
@@ -7,6 +8,6 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
public bool? State { get; set; }
public string? MenuName { get; set; }
public MenuSourceEnum MenuSource { get; set; } = MenuSourceEnum.Ruoyi;
}
}

View File

@@ -20,7 +20,6 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
public string? Component { get; set; }
public string? Query { get; set; }
public int OrderNum { get; set; }
//public List<MenuEntity>? Children { get; set; }
public string? RouterName { get; set; }
}
}

View File

@@ -28,6 +28,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.MenuName), x => x.MenuName.Contains(input.MenuName!))
.WhereIF(input.State is not null, x => x.State == input.State)
.Where(x=>x.MenuSource==input.MenuSource)
.OrderByDescending(x => x.OrderNum)
.ToListAsync();
//.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
@@ -45,5 +46,15 @@ namespace Yi.Framework.Rbac.Application.Services.System
return await MapToGetListOutputDtosAsync(entities);
}
public override Task<MenuGetOutputDto> UpdateAsync(Guid id, MenuUpdateInputVo input)
{
return base.UpdateAsync(id, input);
}
public override Task<MenuGetOutputDto> CreateAsync(MenuCreateInputVo input)
{
return base.CreateAsync(input);
}
}
}