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