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(IConsumerOrdersService), ServiceLifetime = LifeTime.Transient)] public class ConsumerOrdersService : BaseService, IConsumerOrdersService { /// /// 商户板块-经营数据-获取经营数据详情列表 /// /// 请求参数 /// 商户板块经营数据-获取经营数据详情列表 public PagedInfo GetBussinessInfoDetailList([FromQuery] PagerInfo page, [FromQuery] MerchantBussinessModuleGetBussinessInfoDetailListDto parm) { //开始拼装查询条件 var predicate = Expressionable.Create(); predicate = predicate.AndIF(parm.MerchantId != null, m => m.MerchantId == parm.MerchantId); predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.TradeDate), m => m.TradeDate.Contains(parm.TradeDate)); var response = Queryable() .Where(predicate.ToExpression()) .ToPage(page); return response; } /// /// 消费者板块-我的-订单列表 /// /// 请求参数 /// 消费者板块我的-订单列表 public PagedInfo GetConsumerOrdersList([FromQuery] PagerInfo page, [FromQuery] ConsumerMySelfModuleGetConsumerOrdersListDto parm) { //开始拼装查询条件 var predicate = Expressionable.Create(); predicate = predicate.AndIF(parm.PayMode != null, m => m.PayMode == parm.PayMode); var response = Queryable() .Where(predicate.ToExpression()) .ToPage(page); return response; } } }