using Vo; using Microsoft.AspNetCore.Mvc; using Model; using Services; using Model.Base; using Vo.Admin; using Mapster; using Infrastructure; namespace Controllers.Admin { /// /// PriRecursionStartField)Controller /// // [ApiExplorerSettings(GroupName = "PriRecursionStartField")] public class PriRecursionStartFieldController : BaseController { /// /// api分组接口 /// private readonly IPriRecursionStartFieldService _PriRecursionStartFieldService; public PriRecursionStartFieldController(IPriRecursionStartFieldService PriRecursionStartFieldService) { _PriRecursionStartFieldService = PriRecursionStartFieldService; } /// 分页参数 /// /// 列表 /// /// 分页对象 /// 参数请求体 /// 列表 [HttpGet] [Route("/v1/pri/PriRecursionStartField/getPriRecursionStartFieldList")] public IActionResult getPriRecursionStartFieldList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartField param) { var response = _PriRecursionStartFieldService.getPriRecursionStartFieldList(page, param); return SUCCESS(response); } /// /// 详情 /// /// 参数请求体 /// 详情 [HttpGet] [Route("/v1/pri/PriRecursionStartField/getPriRecursionStartFieldQuery")] public IActionResult getPriRecursionStartFieldQuery([FromQuery] PriRecursionStartField param) { var response = _PriRecursionStartFieldService.GetFirst(m => m.id == param.id).Adapt(); return SUCCESS(response); } /// /// 添加 /// /// 参数请求体 /// 添加 [HttpPost] [Route("/v1/pri/PriRecursionStartField/addPriRecursionStartField")] public IActionResult addPriRecursionStartField([FromBody] PriRecursionStartField param) { var modal = param.Adapt().ToCreate(HttpContext); var response = _PriRecursionStartFieldService.Add(modal); return SUCCESS(response); } /// /// 修改 /// /// 参数请求体 /// 修改 [HttpPut] [Route("/v1/pri/PriRecursionStartField/updatePriRecursionStartField")] public IActionResult updatePriRecursionStartField([FromBody] PriRecursionStartField param) { var modal = param.Adapt().ToCreate(HttpContext); var response = _PriRecursionStartFieldService.Update(modal); return SUCCESS(response); } /// /// 删除 /// /// ID /// 删除 [HttpDelete] [Route("/v1/pri/PriRecursionStartField/deletePriRecursionStartField/{id}")] public IActionResult deletePriRecursionStartField(int id) { var response = _PriRecursionStartFieldService.Delete(id); return SUCCESS(response); } } }