using DS.Module.Core; using DS.WMS.Core.System.Dtos; using DS.WMS.Core.System.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.WebApi.Controllers; /// /// 字典模块 /// public class SysDictionaryController : ApiController { private readonly ISysDictionaryService _invokeService; /// /// 构造函数 /// /// public SysDictionaryController(ISysDictionaryService invokeService) { _invokeService = invokeService; } /// /// 字典列表 /// /// /// [HttpPost] [Route("GetDictionaryList")] public DataResult> GetDictionaryList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 获取字典信息 /// /// /// [HttpGet] [Route("GetSysDictionaryInfo")] public DataResult GetSysDictionaryInfo([FromQuery]int id) { var res = _invokeService.GetSysDictionaryInfo(id); return res; } /// /// 编辑字典 /// /// /// [HttpPost] [Route("EditSysDictionaryInfo")] public DataResult EditSysDictionaryInfo([FromBody] SysDictionaryInput model) { var res = _invokeService.EditSysDictionaryInfo(model); return res; } /// /// 字典明细列表 /// /// /// [HttpPost] [Route("GetSysDictionaryList")] public DataResult> GetSysDictionaryList([FromBody] PageRequest request) { var res = _invokeService.GetSysDictionaryList(request); return res; } /// /// 获取字典明细信息 /// /// /// [HttpGet] [Route("GetSysDictionaryListInfo")] public DataResult GetSysDictionaryListInfo([FromQuery]int id) { var res = _invokeService.GetSysDictionaryListInfo(id); return res; } /// /// 编辑字典明细 /// /// /// [HttpPost] [Route("EditSysDictionaryListInfo")] public DataResult EditSysDictionaryListInfo([FromBody] SysDictionaryListInput model) { var res = _invokeService.EditSysDictionaryListInfo(model); return res; } /// /// 删除字典明细 /// /// /// [HttpGet] [Route("DelSysDictionaryListInfo")] public DataResult DelSysDictionaryListInfo([FromQuery]int id) { var res = _invokeService.DelSysDictionaryListInfo(id); return res; } }