using Attribute; using Model; using Model.Base; using Repository; using Service; using Microsoft.AspNetCore.Mvc; using Vo.Admin; namespace Services { /// /// 奖励条件Service业务层处理 /// [AppService(ServiceType = typeof(IPriConditionService), ServiceLifetime = LifeTime.Transient)] public class PriConditionService : BaseService, IPriConditionService { /// /// 奖励条件-列表 /// /// 配置ID /// 分页参数 /// 列表 public PagedInfo getPriConditionList([FromQuery] PagerInfo page, [FromQuery] PriCondition param) { //拼装查询条件 var predicate = Expressionable.Create(); predicate = predicate.AndIF(param.listId > 0, m => m.listId == param.listId); var response = Queryable() .Where(predicate.ToExpression()) .OrderByDescending(m => m.id) .ToPage(page); return response; } } }