#region copyright
//------------------------------------------------------------------------------
// 此代码版权声明为全文件覆盖,如有原作者特别声明,会在下方手动补充
// 此代码版权(除特别声明外的代码)归作者本人Diego所有
// 源代码使用协议遵循本仓库的开源协议及附加协议
// Gitee源代码仓库:https://gitee.com/diego2098/ThingsGateway
// Github源代码仓库:https://github.com/kimdiego2098/ThingsGateway
// 使用文档:https://diego2098.gitee.io/thingsgateway-docs/
// QQ群:605534569
//------------------------------------------------------------------------------
#endregion
using Furion.DependencyInjection;
using ThingsGateway.Admin.Core;
namespace ThingsGateway.Admin.Application;
///
/// 资源服务
///
public interface IResourceService : ITransient
{
///
/// 获取所有的菜单和模块以及单页面列表,并按分类和排序码排序,不会形成树列表
///
/// 所有的菜单和模块以及单页面列表
Task> GetaMenuAndSpaListAsync();
///
/// 获取子资源
///
///
///
///
///
List GetChildListById(List sysResources, long resId, bool isContainOneself = true);
///
/// 获取ID获取Code列表
///
/// id列表
/// 分类
/// Code列表
Task> GetCodeByIdsAsync(List ids, ResourceCategoryEnum category);
///
/// 根据分类获取资源列表
///
/// 分类名称
/// 资源列表
Task> GetListByCategoryAsync(ResourceCategoryEnum category);
///
/// 资源分类列表,如果是空的则获取全部资源
///
/// 资源分类列表
///
Task> GetListByCategorysAsync(List categorys = null);
///
/// 获取资源所有下级
///
/// 资源列表
/// 父ID
///
List GetResourceChilden(List resourceList, long parentId);
///
/// 获取上级
///
///
List GetResourceParent(List resourceList, long parentId);
///
/// 获取授权菜单
///
///
Task> GetRoleGrantResourceMenusAsync();
///
/// 刷新缓存
///
/// 分类名称
///
void RefreshCache(ResourceCategoryEnum category);
///
/// 构建菜单树形结构
///
/// 菜单列表
/// 父ID
/// 菜单形结构
///
List ResourceListToTree(List resourceList, long parentId = 0);
///
/// 多个树转列表
///
///
List ResourceTreeToList(List data);
///
/// 获取PageTabItems
///
///
///
List SameLevelMenuPasePageTab(List nav);
}