PriRecursionStartFieldController.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. /// PriRecursionStartField)Controller
  13. /// </summary>
  14. // [ApiExplorerSettings(GroupName = "PriRecursionStartField")]
  15. public class PriRecursionStartFieldController : BaseController
  16. {
  17. /// <summary>
  18. /// api分组接口
  19. /// </summary>
  20. private readonly IPriRecursionStartFieldService _PriRecursionStartFieldService;
  21. public PriRecursionStartFieldController(IPriRecursionStartFieldService PriRecursionStartFieldService)
  22. {
  23. _PriRecursionStartFieldService = PriRecursionStartFieldService;
  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/PriRecursionStartField/getPriRecursionStartFieldList")]
  34. public IActionResult getPriRecursionStartFieldList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartField param)
  35. {
  36. var response = _PriRecursionStartFieldService.getPriRecursionStartFieldList(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/PriRecursionStartField/getPriRecursionStartFieldQuery")]
  46. public IActionResult getPriRecursionStartFieldQuery([FromQuery] PriRecursionStartField param)
  47. {
  48. var response = _PriRecursionStartFieldService.GetFirst(m => m.id == param.id).Adapt<GetPriRecursionStartFieldQueryVo>();
  49. return SUCCESS(response);
  50. }
  51. /// <summary>
  52. /// 添加
  53. /// </summary>
  54. /// <param name="param">参数请求体</param>
  55. /// <returns>添加</returns>
  56. [HttpPost]
  57. [Route("/v1/pri/PriRecursionStartField/addPriRecursionStartField")]
  58. public IActionResult addPriRecursionStartField([FromBody] PriRecursionStartField param)
  59. {
  60. var modal = param.Adapt<PriRecursionStartField>().ToCreate(HttpContext);
  61. var response = _PriRecursionStartFieldService.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/PriRecursionStartField/updatePriRecursionStartField")]
  71. public IActionResult updatePriRecursionStartField([FromBody] PriRecursionStartField param)
  72. {
  73. var modal = param.Adapt<PriRecursionStartField>().ToCreate(HttpContext);
  74. var response = _PriRecursionStartFieldService.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/PriRecursionStartField/deletePriRecursionStartField/{id}")]
  84. public IActionResult deletePriRecursionStartField(int id)
  85. {
  86. var response = _PriRecursionStartFieldService.Delete(id);
  87. return SUCCESS(response);
  88. }
  89. }
  90. }