基础服务api
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

71 lines
2.3 KiB

  1. using BPA.SAAS.Manage.Application.System.Dtos;
  2. using BPA.SAAS.Manage.Application.System.Interface;
  3. using BPA.SAAS.Manage.Core.Base;
  4. using BPA.SAAS.Manage.Core.system;
  5. namespace BPA.SAAS.Manage.Application
  6. {
  7. /// <summary>
  8. /// 数据字典服务接口
  9. /// </summary>
  10. [ApiDescriptionSettings("SYS", Tag = "字典信息")]
  11. public class DictDataServices : IDynamicApiController
  12. {
  13. private readonly IDictDataService _dictDataService;
  14. public DictDataServices(IDictDataService dictDataService)
  15. {
  16. _dictDataService = dictDataService;
  17. }
  18. /// <summary>
  19. /// 查询字典信息
  20. /// </summary>
  21. /// <param name="dto"></param>
  22. /// <returns></returns>
  23. [HttpPost("/api/dictdata/getdictdata")]
  24. public async Task<PageUtil> GetDictData(DictDataQueryDto dto)
  25. {
  26. return await _dictDataService.GetDictData(dto);
  27. }
  28. /// <summary>
  29. /// 添加字典信息
  30. /// </summary>
  31. /// <param name="dto"></param>
  32. /// <returns></returns>
  33. [HttpPost("/api/dictdata/adddictdata")]
  34. public async Task<bool> AddDictData(DictDataDto dto)
  35. {
  36. return await _dictDataService.AddDictData(dto);
  37. }
  38. /// <summary>
  39. /// 根据字典类型编码查询
  40. /// </summary>
  41. /// <param name="typeCode"></param>
  42. /// <returns></returns>
  43. [HttpGet("/api/dictdata/getdiclist")]
  44. public async Task<List<BPA_DictData>> GetDicList(string typeCode)
  45. {
  46. return await _dictDataService.GetDicList(typeCode);
  47. }
  48. /// <summary>
  49. /// 修改字典信息
  50. /// </summary>
  51. /// <param name="dto"></param>
  52. /// <returns></returns>
  53. [HttpPost("/api/dictdata/updatedictdata")]
  54. public async Task<bool> UpdateDictData(DictDataDto dto)
  55. {
  56. return await _dictDataService.UpdateDictData(dto);
  57. }
  58. /// <summary>
  59. /// 删除字典信息
  60. /// </summary>
  61. /// <param name="ids"></param>
  62. /// <returns></returns>
  63. [HttpPost("/api/dictdata/batchdeldictdata")]
  64. public async Task<bool> BatchDelDictData(List<string> ids)
  65. {
  66. return await _dictDataService.BatchDelDictData(ids);
  67. }
  68. }
  69. }