1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using Attribute;
- using Dto;
- using Vo;
- using Model;
- using Model.Base;
- using Repository;
- using Service;
- using Microsoft.AspNetCore.Mvc;
- namespace Services
- {
- /// <summary>
- /// 消费记录表Service业务层处理
- /// </summary>
- [AppService(ServiceType = typeof(IConsumerOrdersService), ServiceLifetime = LifeTime.Transient)]
- public class ConsumerOrdersService : BaseService<ConsumerOrders>, IConsumerOrdersService
- {
- /// <summary>
- /// 商户板块-经营数据-获取经营数据详情列表
- /// </summary>
- /// <param name="parm">请求参数</param>
- /// <returns>商户板块经营数据-获取经营数据详情列表</returns>
- public PagedInfo<MerchantBussinessModuleGetBussinessInfoDetailListVo> GetBussinessInfoDetailList([FromQuery] PagerInfo page, [FromQuery] MerchantBussinessModuleGetBussinessInfoDetailListDto parm)
- {
- //开始拼装查询条件
- var predicate = Expressionable.Create<ConsumerOrders>();
- 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<ConsumerOrders, MerchantBussinessModuleGetBussinessInfoDetailListVo>(page);
- return response;
- }
- /// <summary>
- /// 消费者板块-我的-订单列表
- /// </summary>
- /// <param name="parm">请求参数</param>
- /// <returns>消费者板块我的-订单列表</returns>
- public PagedInfo<ConsumerMySelfModuleGetConsumerOrdersListVo> GetConsumerOrdersList([FromQuery] PagerInfo page, [FromQuery] ConsumerMySelfModuleGetConsumerOrdersListDto parm)
- {
- //开始拼装查询条件
- var predicate = Expressionable.Create<ConsumerOrders>();
- predicate = predicate.AndIF(parm.PayMode != null, m => m.PayMode == parm.PayMode);
- var response = Queryable()
- .Where(predicate.ToExpression())
- .ToPage<ConsumerOrders, ConsumerMySelfModuleGetConsumerOrdersListVo>(page);
- return response;
- }
- }
- }
|