ConsumerProfitService.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Attribute;
  2. using Dto;
  3. using Vo;
  4. using Model;
  5. using Model.Base;
  6. using Repository;
  7. using Service;
  8. using Microsoft.AspNetCore.Mvc;
  9. namespace Services
  10. {
  11. /// <summary>
  12. /// 消费者分红记录表Service业务层处理
  13. /// </summary>
  14. [AppService(ServiceType = typeof(IConsumerProfitService), ServiceLifetime = LifeTime.Transient)]
  15. public class ConsumerProfitService : BaseService<ConsumerProfit>, IConsumerProfitService
  16. {
  17. /// <summary>
  18. /// 消费者板块-我的-分红列表
  19. /// </summary>
  20. /// <param name="parm">请求参数</param>
  21. /// <returns>消费者板块我的-分红列表</returns>
  22. public PagedInfo<ConsumerMySelfModuleGetConsumerProfitListVo> GetConsumerProfitList([FromQuery] PagerInfo page, [FromQuery] ConsumerMySelfModuleGetConsumerProfitListDto parm)
  23. {
  24. //开始拼装查询条件
  25. var predicate = Expressionable.Create<ConsumerProfit>();
  26. predicate = predicate.AndIF(parm.PayMode != null, m => m.PayMode == parm.PayMode);
  27. var response = Queryable()
  28. .Where(predicate.ToExpression())
  29. .ToPage<ConsumerProfit, ConsumerMySelfModuleGetConsumerProfitListVo>(page);
  30. return response;
  31. }
  32. }
  33. }