|
@@ -0,0 +1,109 @@
|
|
|
|
+using Vo;
|
|
|
|
+using Microsoft.AspNetCore.Mvc;
|
|
|
|
+using Model;
|
|
|
|
+using Services;
|
|
|
|
+using Model.Base;
|
|
|
|
+using Vo.Admin;
|
|
|
|
+using Mapster;
|
|
|
|
+using Infrastructure;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+namespace Controllers.Admin
|
|
|
|
+{
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// PriList)Controller
|
|
|
|
+ /// </summary>
|
|
|
|
+ // [Route("${Router}$")]
|
|
|
|
+ // [ApiExplorerSettings(GroupName = "PriList")]
|
|
|
|
+ public class PriListController : BaseController
|
|
|
|
+ {
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// api分组接口
|
|
|
|
+ /// </summary>
|
|
|
|
+ private readonly IPriListService _PriListService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public PriListController(IPriListService PriListService)
|
|
|
|
+ {
|
|
|
|
+ _PriListService = PriListService;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <param name="page">分页参数</param>
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 列表
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="page">分页对象</param>
|
|
|
|
+ /// <param name="param">参数请求体</param>
|
|
|
|
+ /// <returns>列表</returns>
|
|
|
|
+ [HttpGet]
|
|
|
|
+ [Route("/v1/pri/PriList/getPriListList")]
|
|
|
|
+ public IActionResult getPriListList([FromQuery] PagerInfo page, [FromQuery] PriList param)
|
|
|
|
+ {
|
|
|
|
+ var response = _PriListService.getPriListList(page, param);
|
|
|
|
+ return SUCCESS(response);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 详情
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="param">参数请求体</param>
|
|
|
|
+ /// <returns>详情</returns>
|
|
|
|
+ [HttpGet]
|
|
|
|
+ [Route("/v1/pri/PriList/getPriListQuery")]
|
|
|
|
+ public IActionResult getPriListQuery([FromQuery] PriList param)
|
|
|
|
+ {
|
|
|
|
+ var response = _PriListService.GetFirst(m => m.id == param.id).Adapt<GetPriListQueryVo>();
|
|
|
|
+ return SUCCESS(response);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 添加
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="param">参数请求体</param>
|
|
|
|
+ /// <returns>添加</returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [Route("/v1/pri/PriList/addPriList")]
|
|
|
|
+ public IActionResult addPriList([FromBody] PriList param)
|
|
|
|
+ {
|
|
|
|
+ var modal = param.Adapt<PriList>().ToCreate(HttpContext);
|
|
|
|
+ var response = _PriListService.Add(modal);
|
|
|
|
+ return SUCCESS(response);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 修改
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="param">参数请求体</param>
|
|
|
|
+ /// <returns>修改</returns>
|
|
|
|
+ [HttpPut]
|
|
|
|
+ [Route("/v1/pri/PriList/updatePriList")]
|
|
|
|
+ public IActionResult updatePriList([FromBody] PriList param)
|
|
|
|
+ {
|
|
|
|
+ var modal = param.Adapt<PriList>().ToCreate(HttpContext);
|
|
|
|
+ var response = _PriListService.Update(modal);
|
|
|
|
+ return SUCCESS(response);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 删除
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="id">ID</param>
|
|
|
|
+ /// <returns>删除</returns>
|
|
|
|
+ [HttpDelete]
|
|
|
|
+ [Route("/v1/pri/PriList/deletePriList/{id}")]
|
|
|
|
+ public IActionResult deletePriList(int id)
|
|
|
|
+ {
|
|
|
|
+ var response = _PriListService.Delete(id);
|
|
|
|
+ return SUCCESS(response);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|