SysDictDataAppService.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 字典数据
  5. /// </summary>
  6. [ApiDescriptionSettings(Name = "sys-dict-data")]
  7. [Route("sys/dict/data")]
  8. public class SysDictDataAppService : IDynamicApiController
  9. {
  10. private readonly ISysDictDataService _dictDataService;
  11. public SysDictDataAppService(ISysDictDataService dictDataService)
  12. {
  13. _dictDataService = dictDataService;
  14. }
  15. /// <summary>
  16. /// 获取所有字典列表
  17. /// </summary>
  18. /// <returns></returns>
  19. [AllowAnonymous]
  20. [DisableOpLog]
  21. public async Task<List<SysDictDataOutput>> GetAllList()
  22. {
  23. return await _dictDataService.GetAllList();
  24. }
  25. /// <summary>
  26. /// 通过字典类型ID获取字典列表
  27. /// </summary>
  28. /// <param name="dictTypeId"></param>
  29. /// <returns></returns>
  30. [AllowAnonymous]
  31. [DisableOpLog]
  32. public async Task<List<SysDictDataOutput>> GetListByDictTypeId(int dictTypeId)
  33. {
  34. return await _dictDataService.GetListByDictTypeId(dictTypeId);
  35. }
  36. }