平安校园
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

ModuleController.cs 1.8 KiB

hace 4 meses
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. 
  2. //
  3. namespace SafeCampus.Web.Core;
  4. /// <summary>
  5. /// 模块管理控制器
  6. /// </summary>
  7. [ApiDescriptionSettings(Tag = "模块管理")]
  8. [Route("sys/limit/[controller]")]
  9. [SuperAdmin]
  10. public class ModuleController : BaseController
  11. {
  12. private readonly IModuleService _moduleService;
  13. public ModuleController(IModuleService moduleService)
  14. {
  15. _moduleService = moduleService;
  16. }
  17. /// <summary>
  18. /// 模块分页查询
  19. /// </summary>
  20. /// <param name="input"></param>
  21. /// <returns></returns>
  22. [HttpGet("page")]
  23. public async Task<dynamic> Page([FromQuery] ModulePageInput input)
  24. {
  25. return await _moduleService.Page(input);
  26. }
  27. /// <summary>
  28. /// 添加模块
  29. /// </summary>
  30. /// <param name="input"></param>
  31. /// <returns></returns>
  32. [HttpPost("add")]
  33. [DisplayName("添加模块")]
  34. public async Task Add([FromBody] ModuleAddInput input)
  35. {
  36. await _moduleService.Add(input);
  37. }
  38. /// <summary>
  39. /// 修改模块
  40. /// </summary>
  41. /// <param name="input"></param>
  42. /// <returns></returns>
  43. [HttpPost("edit")]
  44. [DisplayName("修改模块")]
  45. public async Task Edit([FromBody] ModuleEditInput input)
  46. {
  47. await _moduleService.Edit(input);
  48. }
  49. /// <summary>
  50. /// 删除模块
  51. /// </summary>
  52. /// <param name="input"></param>
  53. /// <returns></returns>
  54. [HttpPost("delete")]
  55. [DisplayName("删除模块")]
  56. public async Task Delete([FromBody] BaseIdListInput input)
  57. {
  58. await _moduleService.Delete(input);
  59. }
  60. /// <summary>
  61. /// 获取模块详情
  62. /// </summary>
  63. /// <param name="input"></param>
  64. /// <returns></returns>
  65. [HttpGet("detail")]
  66. public async Task<dynamic> Detail([FromQuery] BaseIdInput input)
  67. {
  68. return await _moduleService.Detail(input);
  69. }
  70. }