12345678910111213141516171819202122232425262728293031323334353637383940 |
- using YBEE.EQM.Core;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// 字典数据
- /// </summary>
- [ApiDescriptionSettings(Name = "sys-dict-data")]
- [Route("sys/dict/data")]
- public class SysDictDataAppService : IDynamicApiController
- {
- private readonly ISysDictDataService _dictDataService;
- public SysDictDataAppService(ISysDictDataService dictDataService)
- {
- _dictDataService = dictDataService;
- }
- /// <summary>
- /// 获取所有字典列表
- /// </summary>
- /// <returns></returns>
- [AllowAnonymous]
- [DisableOpLog]
- public async Task<List<SysDictDataOutput>> GetAllList()
- {
- return await _dictDataService.GetAllList();
- }
- /// <summary>
- /// 通过字典类型ID获取字典列表
- /// </summary>
- /// <param name="dictTypeId"></param>
- /// <returns></returns>
- [AllowAnonymous]
- [DisableOpLog]
- public async Task<List<SysDictDataOutput>> GetListByDictTypeId(int dictTypeId)
- {
- return await _dictDataService.GetListByDictTypeId(dictTypeId);
- }
- }
|