using Attribute; using Model; using Model.Base; using Repository; using Service; using Microsoft.AspNetCore.Mvc; using Vo.Admin; namespace Services { /// /// 奖励金额设置Service业务层处理 /// [AppService(ServiceType = typeof(IPriListAmountSetService), ServiceLifetime = LifeTime.Transient)] public class PriListAmountSetService : BaseService, IPriListAmountSetService { /// /// 奖励金额设置-列表 /// /// 参数请求体 /// 分页参数 /// 列表 public PagedInfo getPriListAmountSetList([FromQuery] PagerInfo page, [FromQuery] PriListAmountSet param) { //拼装查询条件 var predicate = Expressionable.Create(); predicate = predicate.AndIF(param.listId > 0, m => m.listId == param.listId); predicate = predicate.AndIF(!string.IsNullOrEmpty(param.prizeSourceField), m => m.prizeSourceField.Contains(param.prizeSourceField)); var response = Queryable() .Where(predicate.ToExpression()) .OrderByDescending(m => m.id) .ToPage(page); return response; } } }