PriRecursionStartTableController.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. using Vo;
  2. using Microsoft.AspNetCore.Mvc;
  3. using Model;
  4. using Services;
  5. using Model.Base;
  6. using Vo.Admin;
  7. using Mapster;
  8. using Infrastructure;
  9. namespace Controllers.Admin
  10. {
  11. /// <summary>
  12. /// PriRecursionStartTable)Controller
  13. /// </summary>
  14. // [ApiExplorerSettings(GroupName = "PriRecursionStartTable")]
  15. public class PriRecursionStartTableController : BaseController
  16. {
  17. /// <summary>
  18. /// api分组接口
  19. /// </summary>
  20. private readonly IPriRecursionStartTableService _PriRecursionStartTableService;
  21. public PriRecursionStartTableController(IPriRecursionStartTableService PriRecursionStartTableService)
  22. {
  23. _PriRecursionStartTableService = PriRecursionStartTableService;
  24. }
  25. /// <param name="page">分页参数</param>
  26. /// <summary>
  27. /// 列表
  28. /// </summary>
  29. /// <param name="page">分页对象</param>
  30. /// <param name="param">参数请求体</param>
  31. /// <returns>列表</returns>
  32. [HttpGet]
  33. [Route("/v1/pri/PriRecursionStartTable/getPriRecursionStartTableList")]
  34. public IActionResult getPriRecursionStartTableList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartTable param)
  35. {
  36. var response = _PriRecursionStartTableService.getPriRecursionStartTableList(page, param);
  37. return SUCCESS(response);
  38. }
  39. /// <summary>
  40. /// 详情
  41. /// </summary>
  42. /// <param name="param">参数请求体</param>
  43. /// <returns>详情</returns>
  44. [HttpGet]
  45. [Route("/v1/pri/PriRecursionStartTable/getPriRecursionStartTableQuery")]
  46. public IActionResult getPriRecursionStartTableQuery([FromQuery] PriRecursionStartTable param)
  47. {
  48. var response = _PriRecursionStartTableService.GetFirst(m => m.id == param.id).Adapt<GetPriRecursionStartTableQueryVo>();
  49. return SUCCESS(response);
  50. }
  51. /// <summary>
  52. /// 添加
  53. /// </summary>
  54. /// <param name="param">参数请求体</param>
  55. /// <returns>添加</returns>
  56. [HttpPost]
  57. [Route("/v1/pri/PriRecursionStartTable/addPriRecursionStartTable")]
  58. public IActionResult addPriRecursionStartTable([FromBody] PriRecursionStartTable param)
  59. {
  60. var modal = param.Adapt<PriRecursionStartTable>().ToCreate(HttpContext);
  61. var response = _PriRecursionStartTableService.Add(modal);
  62. return SUCCESS(response);
  63. }
  64. /// <summary>
  65. /// 修改
  66. /// </summary>
  67. /// <param name="param">参数请求体</param>
  68. /// <returns>修改</returns>
  69. [HttpPut]
  70. [Route("/v1/pri/PriRecursionStartTable/updatePriRecursionStartTable")]
  71. public IActionResult updatePriRecursionStartTable([FromBody] PriRecursionStartTable param)
  72. {
  73. var modal = param.Adapt<PriRecursionStartTable>().ToCreate(HttpContext);
  74. var response = _PriRecursionStartTableService.Update(modal);
  75. return SUCCESS(response);
  76. }
  77. /// <summary>
  78. /// 删除
  79. /// </summary>
  80. /// <param name="id">ID</param>
  81. /// <returns>删除</returns>
  82. [HttpDelete]
  83. [Route("/v1/pri/PriRecursionStartTable/deletePriRecursionStartTable/{id}")]
  84. public IActionResult deletePriRecursionStartTable(int id)
  85. {
  86. var response = _PriRecursionStartTableService.Delete(id);
  87. return SUCCESS(response);
  88. }
  89. /// <param name="page">分页参数</param>
  90. /// <summary>
  91. /// 下拉框数据
  92. /// </summary>
  93. /// <param name="page">分页对象</param>
  94. /// <returns>下拉框数据</returns>
  95. [HttpGet]
  96. [Route("/v1/pri/PriRecursionStartTable/getPriRecursionStartTableDic")]
  97. public IActionResult getPriRecursionStartTableDic([FromQuery] PagerInfo page)
  98. {
  99. var response = _PriRecursionStartTableService.getPriRecursionStartTableDic(page);
  100. return SUCCESS(response);
  101. }
  102. }
  103. }