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