基础服务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.
 
 

79 lines
2.4 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 System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Xml.Linq;
  10. namespace BPA.SAAS.Manage.Application.System
  11. {
  12. [ApiDescriptionSettings("SYS", Tag = "字典类型")]
  13. public class DictTypeServices: IDynamicApiController, ITransient
  14. {
  15. IDictTypeService _dicttypeServices;
  16. /// <summary>
  17. ///
  18. /// </summary>
  19. /// <param name="dicttypeServices"></param>
  20. public DictTypeServices(IDictTypeService dicttypeServices)
  21. {
  22. _dicttypeServices = dicttypeServices;
  23. }
  24. #region 字典类型信息
  25. /// <summary>
  26. /// 查询字典类型信息
  27. /// </summary>
  28. /// <param name="dto"></param>
  29. /// <returns></returns>
  30. [HttpPost("/api/dicttype/getdicttype")]
  31. public async Task<PageUtil> GetDictType([FromBody] DictTypeQueryDto dto)
  32. {
  33. return await _dicttypeServices.GetDictType(dto);
  34. }
  35. /// <summary>
  36. /// 添加字典类型信息
  37. /// </summary>
  38. /// <param name="dto"></param>
  39. /// <returns></returns>
  40. [HttpPost("/api/dicttype/adddicttype")]
  41. public async Task<bool> Add(DictTypeDto dto)
  42. {
  43. return await _dicttypeServices.AddDictType(dto);
  44. }
  45. /// <summary>
  46. /// 修改字典类型信息
  47. /// </summary>
  48. /// <param name="dto"></param>
  49. /// <returns></returns>
  50. [HttpPost("/api/dicttype/updatedicttype")]
  51. public async Task<bool> Update(DictTypeDto dto)
  52. {
  53. return await _dicttypeServices.UpdateDictType(dto);
  54. }
  55. /// <summary>
  56. /// 删除字典类型信息
  57. /// </summary>
  58. /// <param name="ids"></param>
  59. /// <returns></returns>
  60. [HttpPost("/api/dicttype/deletetedicttype")]
  61. public async Task<bool> Delete(List<string> ids)
  62. {
  63. return await _dicttypeServices.BathchDelDictType(ids);
  64. }
  65. /// <summary>
  66. /// 字典类型下拉数据列表
  67. /// </summary>
  68. /// <returns></returns>
  69. [HttpGet("/api/dicttype/dicttype")]
  70. public Dictionary<string, object> GetDictType()
  71. {
  72. return _dicttypeServices.GetDictType();
  73. }
  74. #endregion
  75. }
  76. }