using Vo;
using Microsoft.AspNetCore.Mvc;
using Model;
using Services;
using Model.Base;
using Vo.Admin;
using Mapster;
using Infrastructure;
namespace Controllers.Admin
{
///
/// PriRecursionStartReturnField)Controller
///
// [Route("${Router}$")]
// [ApiExplorerSettings(GroupName = "PriRecursionStartReturnField")]
public class PriRecursionStartReturnFieldController : BaseController
{
///
/// api分组接口
///
private readonly IPriRecursionStartReturnFieldService _PriRecursionStartReturnFieldService;
public PriRecursionStartReturnFieldController(IPriRecursionStartReturnFieldService PriRecursionStartReturnFieldService)
{
_PriRecursionStartReturnFieldService = PriRecursionStartReturnFieldService;
}
/// 分页参数
///
/// 列表
///
/// 分页对象
/// 参数请求体
/// 列表
[HttpGet]
[Route("/v1/pri/PriRecursionStartReturnField/getPriRecursionStartReturnFieldList")]
public IActionResult getPriRecursionStartReturnFieldList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartReturnField param)
{
var response = _PriRecursionStartReturnFieldService.getPriRecursionStartReturnFieldList(page, param);
return SUCCESS(response);
}
///
/// 详情
///
/// 参数请求体
/// 详情
[HttpGet]
[Route("/v1/pri/PriRecursionStartReturnField/getPriRecursionStartReturnFieldQuery")]
public IActionResult getPriRecursionStartReturnFieldQuery([FromQuery] PriRecursionStartReturnField param)
{
var response = _PriRecursionStartReturnFieldService.GetFirst(m => m.id == param.id).Adapt();
return SUCCESS(response);
}
///
/// 添加
///
/// 参数请求体
/// 添加
[HttpPost]
[Route("/v1/pri/PriRecursionStartReturnField/addPriRecursionStartReturnField")]
public IActionResult addPriRecursionStartReturnField([FromBody] PriRecursionStartReturnField param)
{
var modal = param.Adapt().ToCreate(HttpContext);
var response = _PriRecursionStartReturnFieldService.Add(modal);
return SUCCESS(response);
}
///
/// 修改
///
/// 参数请求体
/// 修改
[HttpPut]
[Route("/v1/pri/PriRecursionStartReturnField/updatePriRecursionStartReturnField")]
public IActionResult updatePriRecursionStartReturnField([FromBody] PriRecursionStartReturnField param)
{
var modal = param.Adapt().ToCreate(HttpContext);
var response = _PriRecursionStartReturnFieldService.Update(modal);
return SUCCESS(response);
}
///
/// 删除
///
/// ID
/// 删除
[HttpDelete]
[Route("/v1/pri/PriRecursionStartReturnField/deletePriRecursionStartReturnField/{id}")]
public IActionResult deletePriRecursionStartReturnField(int id)
{
var response = _PriRecursionStartReturnFieldService.Delete(id);
return SUCCESS(response);
}
}
}