using DS.Module.Core; using DS.WMS.Core.System.Dtos; using DS.WMS.Core.System.Entity; using DS.WMS.Core.System.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.MainApi.Controllers; /// /// 角色模块 /// public class RoleController : ApiController { private readonly ISysRoleService _invokeService; /// /// 构造函数 /// /// public RoleController(ISysRoleService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetRoleList")] public DataResult> GetRoleList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditRole")] public DataResult EditRole([FromBody] RoleInput model) { var res = _invokeService.EditRole(model); return res; } /// /// 详情 /// /// /// [HttpGet] [Route("GetRoleInfo")] public DataResult GetRoleInfo([FromQuery] string id) { var res = _invokeService.GetRoleInfo(id); return res; } /// /// 获取角色权限树-客户端 /// /// [HttpGet] [Route("GetClientRolePermissionTree")] public DataResult GetClientRolePermissionTree() { var res = _invokeService.GetClientRolePermissionTree(); return res; } /// /// 获取角色权限 /// /// /// [HttpGet] [Route("GetRolePermission")] public DataResult GetRolePermission([FromQuery] string id) { var res = _invokeService.GetRolePermission(id); return res; } /// /// 更新角色权限-客户端 /// /// /// [HttpPost] [Route("UpdateClientRolePermission")] public DataResult UpdateClientRolePermission([FromBody] RolePermissionInput model) { var res = _invokeService.UpdateClientRolePermission(model); return res; } }