using Vo; using Microsoft.AspNetCore.Mvc; using Model; using Services; using Model.Base; using Vo.Admin; using Mapster; using Infrastructure; namespace Controllers.Admin { /// /// PriLoopSet)Controller /// // [Route("${Router}$")] // [ApiExplorerSettings(GroupName = "PriLoopSet")] public class PriLoopSetController : BaseController { /// /// api分组接口 /// private readonly IPriLoopSetService _PriLoopSetService; public PriLoopSetController(IPriLoopSetService PriLoopSetService) { _PriLoopSetService = PriLoopSetService; } /// 分页参数 /// /// 列表 /// /// 分页对象 /// 参数请求体 /// 列表 [HttpGet] [Route("/v1/pri/PriLoopSet/getPriLoopSetList")] public IActionResult getPriLoopSetList([FromQuery] PagerInfo page, [FromQuery] PriLoopSet param) { var response = _PriLoopSetService.getPriLoopSetList(page, param); return SUCCESS(response); } /// /// 详情 /// /// 参数请求体 /// 详情 [HttpGet] [Route("/v1/pri/PriLoopSet/getPriLoopSetQuery")] public IActionResult getPriLoopSetQuery([FromQuery] PriLoopSet param) { var response = _PriLoopSetService.GetFirst(m => m.id == param.id).Adapt(); return SUCCESS(response); } /// /// 添加 /// /// 参数请求体 /// 添加 [HttpPost] [Route("/v1/pri/PriLoopSet/addPriLoopSet")] public IActionResult addPriLoopSet([FromBody] PriLoopSet param) { var modal = param.Adapt().ToCreate(HttpContext); var response = _PriLoopSetService.Add(modal); return SUCCESS(response); } /// /// 修改 /// /// 参数请求体 /// 修改 [HttpPut] [Route("/v1/pri/PriLoopSet/updatePriLoopSet")] public IActionResult updatePriLoopSet([FromBody] PriLoopSet param) { var modal = param.Adapt().ToCreate(HttpContext); var response = _PriLoopSetService.Update(modal); return SUCCESS(response); } /// /// 删除 /// /// ID /// 删除 [HttpDelete] [Route("/v1/pri/PriLoopSet/deletePriLoopSet/{id}")] public IActionResult deletePriLoopSet(int id) { var response = _PriLoopSetService.Delete(id); return SUCCESS(response); } /// /// 下拉框数据 /// /// 分页对象 /// 下拉框数据 [HttpGet] [Route("/v1/pri/PriLoopSet/getPriLoopSetDic")] public IActionResult getPriLoopSetDic([FromQuery] PagerInfo page) { var response = _PriLoopSetService.getPriLoopSetDic(page); return SUCCESS(response); } } }