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