using DS.Module.Core; using DS.WMS.Core.Sys.Dtos; using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Interface; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.AdminApi.Controllers; /// /// 字典模块 /// public class DictController : ApiController { private readonly ISysDictTypeService _invokeService; private readonly ISysDictDataService _dictDataService; /// /// 构造函数 /// /// public DictController(ISysDictTypeService invokeService,ISysDictDataService dictDataService) { _invokeService = invokeService; _dictDataService = dictDataService; } /// /// 字典类型列表 /// /// /// [HttpPost] [Route("GetSysDictTypeList")] public DataResult> GetSysDictTypeList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 编辑字典类型 /// /// /// [HttpPost] [Route("EditDictType")] public DataResult EditDictType([FromBody] DictTypeReq model) { var res = _invokeService.EditDictType(model); return res; } /// /// 字典明细列表 /// /// /// [HttpPost] [Route("GetSysDictDataList")] public DataResult> GetSysDictDataList([FromBody] PageRequest request) { var res = _dictDataService.GetListByPage(request); return res; } /// /// 编辑字典明细 /// /// /// [HttpPost] [Route("EditDictData")] public DataResult EditDictData([FromBody] DictDataReq model) { var res = _dictDataService.EditDictData(model); return res; } /// /// 字典类型详情 /// /// /// [HttpGet] [Route("GetDictTypeInfo")] public DataResult GetDictTypeInfo([FromQuery] string id) { var res = _invokeService.GetDictTypeInfo(id); return res; } /// /// 字典明细详情 /// /// /// [HttpGet] [Route("GetDictDataInfo")] public DataResult GetDictDataInfo([FromQuery] string id) { var res = _dictDataService.GetDictDataInfo(id); return res; } }