Ejemplo n.º 1
0
        /// <summary>
        /// 查询字典
        /// </summary>
        /// <param name="queryInput"></param>
        /// <returns></returns>
        public async Task <Paged <DictOutput> > GetPaged(DictQueryInput queryInput)
        {
            var query = queryInput.Adapt <DictQuery>();

            query.DictType = DictType.Main;

            var result = await _dictRep.GetDictPagedResult(query);

            return(result.Adapt <Paged <DictOutput> >());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取字典数据
        /// </summary>
        /// <returns></returns>
        public async Task <Paged <DictItemOutput> > GetDictItemPaged(DictQueryInput queryInput)
        {
            var query = queryInput.Adapt <DictQuery>();

            query.OrderBy(a => a.Sort).OrderBy(a => a.CreateTime);

            var dicts = await _dictRep.GetPagedAsync(query);

            return(dicts.Adapt <Paged <DictItemOutput> >());
        }