// namespace SafeCampus.Web.Core; /// /// 权限按钮控制器 /// [ApiDescriptionSettings(Tag = "权限按钮")] [Route("sys/limit/[controller]")] [SuperAdmin] public class ButtonController : BaseController { private readonly IButtonService _buttonService; public ButtonController(IButtonService buttonService) { _buttonService = buttonService; } /// /// 按钮分页查询 /// /// /// [HttpGet("page")] public async Task Page([FromQuery] ButtonPageInput input) { return await _buttonService.Page(input); } /// /// 添加按钮 /// /// /// [HttpPost("add")] [DisplayName("添加按钮")] public async Task Add([FromBody] ButtonAddInput input) { await _buttonService.Add(input); } /// /// 修改按钮 /// /// /// [HttpPost("edit")] [DisplayName("修改按钮")] public async Task Edit([FromBody] ButtonEditInput input) { await _buttonService.Edit(input); } /// /// 删除按钮 /// /// /// [HttpPost("delete")] [DisplayName("删除按钮")] public async Task Delete([FromBody] BaseIdListInput input) { await _buttonService.Delete(input); } /// /// 批量新增 /// /// /// [HttpPost("batch")] [DisplayName("新增按钮")] public async Task Batch([FromBody] ButtonAddInput input) { await _buttonService.AddBatch(input); } /// /// 获取按钮详情 /// /// /// [HttpGet("detail")] public async Task Detail([FromQuery] BaseIdInput input) { return await _buttonService.Detail(input); } }