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