Merge branch 'master' of http://120.26.58.240:8888/r/ApiFlexJob
| | |
| | | public class DictionaryDatasQueryHandler( |
| | | IRepository<DictionaryData> rep |
| | | ) : IRequestHandler<GetDictionaryDatasQuery, PagedListQueryResult<GetDictionaryDatasQueryResultItem>>, |
| | | IRequestHandler<GetDictionaryDataSelectQuery, List<SelectOption<Guid, GetDictionaryDataSelectQueryResultOption>>> |
| | | IRequestHandler<GetDictionaryDataSelectQuery, List<SelectOption<string, GetDictionaryDataSelectQueryResultOption>>> |
| | | { |
| | | private readonly IRepository<DictionaryData> rep = rep; |
| | | |
| | |
| | | /// <param name="request"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public Task<List<SelectOption<Guid, GetDictionaryDataSelectQueryResultOption>>> Handle(GetDictionaryDataSelectQuery request, CancellationToken cancellationToken) |
| | | public Task<List<SelectOption<string, GetDictionaryDataSelectQueryResultOption>>> Handle(GetDictionaryDataSelectQuery request, CancellationToken cancellationToken) |
| | | { |
| | | return request.GetSelect<DictionaryData, Guid, GetDictionaryDataSelectQueryResultOption>( |
| | | it => it.Id, |
| | | return request.GetSelect<DictionaryData, string, GetDictionaryDataSelectQueryResultOption>( |
| | | it => it.Code, |
| | | it => it.Content, |
| | | q => |
| | | { |
| | |
| | | /// 查询数据字典选择器 |
| | | /// </summary> |
| | | [Resource([EnumResourceController.Dictionary], AllowAnonymous = true)] |
| | | public class GetDictionaryDataSelectQuery : SelectQuery<Guid, GetDictionaryDataSelectQueryResultOption> |
| | | public class GetDictionaryDataSelectQuery : SelectQuery<string, GetDictionaryDataSelectQueryResultOption> |
| | | { |
| | | /// <summary> |
| | | /// 类别Id(Id/编号二选一) |