using Attribute; using Dto; using Vo; using Model; using Model.Base; using Repository; using Service; using Microsoft.AspNetCore.Mvc; namespace Services { /// /// 字典表Service业务层处理 /// [AppService(ServiceType = typeof(ISysDictService), ServiceLifetime = LifeTime.Transient)] public class SysDictService : BaseService, ISysDictService { /// /// 字典表-列表 /// /// 请求参数 /// 字典表列表 public PagedInfo List([FromQuery] SysDictListDto parm) { //开始拼装查询条件 var predicate = Expressionable.Create(); predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.dictType), m => m.dictType.Contains(parm.dictType)); predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.description), m => m.description.Contains(parm.description)); var response = Queryable() .Where(predicate.ToExpression()) .OrderByDescending(m => m.id) .ToPage(new PagerInfo()); return response; } } }