using BPA.SAAS.Manage.Application.Org.Dtos.Role; using BPA.SAAS.Manage.Application.Org.Interface; using BPA.SAAS.Manage.Core.Base; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BPA.SAAS.Manage.Application.Org { [ApiDescriptionSettings("Org", Tag = "角色信息")] public class RolesServices: IDynamicApiController { IRoleService _roleService; public RolesServices(IRoleService roleService) { _roleService=roleService; } /// /// 分页查询 /// /// /// [HttpPost("/api/roles/page")] public async Task Page(RoleDtoPageInput input) { return await _roleService.Page(input); } /// /// 根据角色查询角色菜单 /// /// /// [HttpGet("/api/roles/getmenurole")] public async Task> GetMenuRole(string RoleId) { return await _roleService.GetMenuRole(RoleId); } /// /// 添加 /// /// /// [HttpPost("/api/roles/add")] public async Task Add(RoleDtoInput input) { return await _roleService.Add(input); } /// /// 更新 /// /// /// [HttpPost("/api/roles/update")] public async Task Update(RoleDtoInput input) { return await _roleService.Update(input); } /// /// 删除 /// /// /// [HttpPost("/api/roles/delete")] public async Task Delete(List input) { return await _roleService.Delete(input); } /// /// 编辑角色菜单 /// /// /// [HttpPost("/api/roles/addorupdatemenurole")] public async Task AddOrUpdateMenuRole(RoleMenuDtoInput input) { return await _roleService.AddOrUpdateMenuRole(input); } /// /// 启用 /// /// /// [HttpGet("/api/roles/enable")] public async Task Enable(string Id) { return await _roleService.Enable(Id); } /// /// 禁用 /// /// /// [HttpGet("/api/roles/disable")] public async Task Disable(string Id) { return await _roleService.Disable(Id); } /// /// 获取所有角色 /// /// [HttpGet("/api/roles/getrole")] public async Task> GetRole() { return await _roleService.GetRole(); } } }