From bba5a5039adc9b72fb00c4b11fe27164104c03f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Tue, 12 Oct 2021 14:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=9C=8D=E5=8A=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Yi.Framework.Interface/IMenuService.cs | 29 +++++++++++++++++++ .../Yi.Framework.Interface/IMouldService.cs | 7 +++++ .../Yi.Framework.Interface/IRoleService.cs | 22 ++++++++++++++ 3 files changed, 58 insertions(+) diff --git a/Yi.Framework/Yi.Framework.Interface/IMenuService.cs b/Yi.Framework/Yi.Framework.Interface/IMenuService.cs index fbafc1ea..f4ceaba1 100644 --- a/Yi.Framework/Yi.Framework.Interface/IMenuService.cs +++ b/Yi.Framework/Yi.Framework.Interface/IMenuService.cs @@ -11,5 +11,34 @@ namespace Yi.Framework.Interface { Task DelListByUpdateAsync(List _ids); Task> GetAllEntitiesTrueAsync(); + + /// + /// 通过menu得到mould(1对1关系) + /// + /// + /// + Task GetMouldByMenu(menu _menu); + + /// + /// 通过menu得到他自己与mould(注意:确保返回的menu里含有menu) + /// + /// + /// + Task GetMenuMouldByMenu(menu _menu); + + /// + /// 得到该菜单下所有的子类 + /// + /// + /// + Task> GetChildrenByMenu(menu _menu); + + /// + /// 给菜单设置接口(1对1关系) + /// + /// + /// + /// + Task SetMouldByMenu(int mouldId,int menuId); } } diff --git a/Yi.Framework/Yi.Framework.Interface/IMouldService.cs b/Yi.Framework/Yi.Framework.Interface/IMouldService.cs index c1cf9837..18793441 100644 --- a/Yi.Framework/Yi.Framework.Interface/IMouldService.cs +++ b/Yi.Framework/Yi.Framework.Interface/IMouldService.cs @@ -11,5 +11,12 @@ namespace Yi.Framework.Interface { Task DelListByUpdateAsync(List _ids); Task> GetAllEntitiesTrueAsync(); + + /// + /// 得到该接口属于哪个菜单的 + /// + /// + /// + Task GetMenuByMould(mould _mould); } } diff --git a/Yi.Framework/Yi.Framework.Interface/IRoleService.cs b/Yi.Framework/Yi.Framework.Interface/IRoleService.cs index 44ed4b0a..337278de 100644 --- a/Yi.Framework/Yi.Framework.Interface/IRoleService.cs +++ b/Yi.Framework/Yi.Framework.Interface/IRoleService.cs @@ -11,5 +11,27 @@ namespace Yi.Framework.Interface { Task DelListByUpdateAsync(List _ids); Task> GetAllEntitiesTrueAsync(); + + /// + /// 获取该角色的所有菜单 + /// + /// + /// + Task> GetMenusByRole(role _role); + + /// + /// 获取含有该角色的所有用户 + /// + /// + /// + Task> GetUsersByRole(role _role); + + /// + /// 给单个角色设置多个菜单 + /// + /// + /// + /// + Task SetMenusByRolesId(List menuIds, int roleId); } }