PriRecursionStartReturnFieldController.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. /// PriRecursionStartReturnField)Controller
  13. /// </summary>
  14. // [Route("${Router}$")]
  15. // [ApiExplorerSettings(GroupName = "PriRecursionStartReturnField")]
  16. public class PriRecursionStartReturnFieldController : BaseController
  17. {
  18. /// <summary>
  19. /// api分组接口
  20. /// </summary>
  21. private readonly IPriRecursionStartReturnFieldService _PriRecursionStartReturnFieldService;
  22. public PriRecursionStartReturnFieldController(IPriRecursionStartReturnFieldService PriRecursionStartReturnFieldService)
  23. {
  24. _PriRecursionStartReturnFieldService = PriRecursionStartReturnFieldService;
  25. }
  26. /// <param name="page">分页参数</param>
  27. /// <summary>
  28. /// 列表
  29. /// </summary>
  30. /// <param name="page">分页对象</param>
  31. /// <param name="param">参数请求体</param>
  32. /// <returns>列表</returns>
  33. [HttpGet]
  34. [Route("/v1/pri/PriRecursionStartReturnField/getPriRecursionStartReturnFieldList")]
  35. public IActionResult getPriRecursionStartReturnFieldList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartReturnField param)
  36. {
  37. var response = _PriRecursionStartReturnFieldService.getPriRecursionStartReturnFieldList(page, param);
  38. return SUCCESS(response);
  39. }
  40. /// <summary>
  41. /// 详情
  42. /// </summary>
  43. /// <param name="param">参数请求体</param>
  44. /// <returns>详情</returns>
  45. [HttpGet]
  46. [Route("/v1/pri/PriRecursionStartReturnField/getPriRecursionStartReturnFieldQuery")]
  47. public IActionResult getPriRecursionStartReturnFieldQuery([FromQuery] PriRecursionStartReturnField param)
  48. {
  49. var response = _PriRecursionStartReturnFieldService.GetFirst(m => m.id == param.id).Adapt<GetPriRecursionStartReturnFieldQueryVo>();
  50. return SUCCESS(response);
  51. }
  52. /// <summary>
  53. /// 添加
  54. /// </summary>
  55. /// <param name="param">参数请求体</param>
  56. /// <returns>添加</returns>
  57. [HttpPost]
  58. [Route("/v1/pri/PriRecursionStartReturnField/addPriRecursionStartReturnField")]
  59. public IActionResult addPriRecursionStartReturnField([FromBody] PriRecursionStartReturnField param)
  60. {
  61. var modal = param.Adapt<PriRecursionStartReturnField>().ToCreate(HttpContext);
  62. var response = _PriRecursionStartReturnFieldService.Add(modal);
  63. return SUCCESS(response);
  64. }
  65. /// <summary>
  66. /// 修改
  67. /// </summary>
  68. /// <param name="param">参数请求体</param>
  69. /// <returns>修改</returns>
  70. [HttpPut]
  71. [Route("/v1/pri/PriRecursionStartReturnField/updatePriRecursionStartReturnField")]
  72. public IActionResult updatePriRecursionStartReturnField([FromBody] PriRecursionStartReturnField param)
  73. {
  74. var modal = param.Adapt<PriRecursionStartReturnField>().ToCreate(HttpContext);
  75. var response = _PriRecursionStartReturnFieldService.Update(modal);
  76. return SUCCESS(response);
  77. }
  78. /// <summary>
  79. /// 删除
  80. /// </summary>
  81. /// <param name="id">ID</param>
  82. /// <returns>删除</returns>
  83. [HttpDelete]
  84. [Route("/v1/pri/PriRecursionStartReturnField/deletePriRecursionStartReturnField/{id}")]
  85. public IActionResult deletePriRecursionStartReturnField(int id)
  86. {
  87. var response = _PriRecursionStartReturnFieldService.Delete(id);
  88. return SUCCESS(response);
  89. }
  90. }
  91. }