using Vo;
using Microsoft.AspNetCore.Mvc;
using Model;
using Services;
using Model.Base;
using Vo.Admin;
using Mapster;
using Infrastructure;
namespace Controllers.Admin
{
///
/// PriRecursionStartTable)Controller
///
// [ApiExplorerSettings(GroupName = "PriRecursionStartTable")]
public class PriRecursionStartTableController : BaseController
{
///
/// api分组接口
///
private readonly IPriRecursionStartTableService _PriRecursionStartTableService;
public PriRecursionStartTableController(IPriRecursionStartTableService PriRecursionStartTableService)
{
_PriRecursionStartTableService = PriRecursionStartTableService;
}
/// 分页参数
///
/// 列表
///
/// 分页对象
/// 参数请求体
/// 列表
[HttpGet]
[Route("/v1/pri/PriRecursionStartTable/getPriRecursionStartTableList")]
public IActionResult getPriRecursionStartTableList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartTable param)
{
var response = _PriRecursionStartTableService.getPriRecursionStartTableList(page, param);
return SUCCESS(response);
}
///
/// 详情
///
/// 参数请求体
/// 详情
[HttpGet]
[Route("/v1/pri/PriRecursionStartTable/getPriRecursionStartTableQuery")]
public IActionResult getPriRecursionStartTableQuery([FromQuery] PriRecursionStartTable param)
{
var response = _PriRecursionStartTableService.GetFirst(m => m.id == param.id).Adapt();
return SUCCESS(response);
}
///
/// 添加
///
/// 参数请求体
/// 添加
[HttpPost]
[Route("/v1/pri/PriRecursionStartTable/addPriRecursionStartTable")]
public IActionResult addPriRecursionStartTable([FromBody] PriRecursionStartTable param)
{
var modal = param.Adapt().ToCreate(HttpContext);
var response = _PriRecursionStartTableService.Add(modal);
return SUCCESS(response);
}
///
/// 修改
///
/// 参数请求体
/// 修改
[HttpPut]
[Route("/v1/pri/PriRecursionStartTable/updatePriRecursionStartTable")]
public IActionResult updatePriRecursionStartTable([FromBody] PriRecursionStartTable param)
{
var modal = param.Adapt().ToCreate(HttpContext);
var response = _PriRecursionStartTableService.Update(modal);
return SUCCESS(response);
}
///
/// 删除
///
/// ID
/// 删除
[HttpDelete]
[Route("/v1/pri/PriRecursionStartTable/deletePriRecursionStartTable/{id}")]
public IActionResult deletePriRecursionStartTable(int id)
{
var response = _PriRecursionStartTableService.Delete(id);
return SUCCESS(response);
}
/// 分页参数
///
/// 下拉框数据
///
/// 分页对象
/// 下拉框数据
[HttpGet]
[Route("/v1/pri/PriRecursionStartTable/getPriRecursionStartTableDic")]
public IActionResult getPriRecursionStartTableDic([FromQuery] PagerInfo page)
{
var response = _PriRecursionStartTableService.getPriRecursionStartTableDic(page);
return SUCCESS(response);
}
}
}