//
namespace SafeCampus.Web.Core;
///
/// 模块管理控制器
///
[ApiDescriptionSettings(Tag = "模块管理")]
[Route("sys/limit/[controller]")]
[SuperAdmin]
public class ModuleController : BaseController
{
private readonly IModuleService _moduleService;
public ModuleController(IModuleService moduleService)
{
_moduleService = moduleService;
}
///
/// 模块分页查询
///
///
///
[HttpGet("page")]
public async Task Page([FromQuery] ModulePageInput input)
{
return await _moduleService.Page(input);
}
///
/// 添加模块
///
///
///
[HttpPost("add")]
[DisplayName("添加模块")]
public async Task Add([FromBody] ModuleAddInput input)
{
await _moduleService.Add(input);
}
///
/// 修改模块
///
///
///
[HttpPost("edit")]
[DisplayName("修改模块")]
public async Task Edit([FromBody] ModuleEditInput input)
{
await _moduleService.Edit(input);
}
///
/// 删除模块
///
///
///
[HttpPost("delete")]
[DisplayName("删除模块")]
public async Task Delete([FromBody] BaseIdListInput input)
{
await _moduleService.Delete(input);
}
///
/// 获取模块详情
///
///
///
[HttpGet("detail")]
public async Task Detail([FromQuery] BaseIdInput input)
{
return await _moduleService.Detail(input);
}
}