From 0497d15d3b0341cb4ab99142a25463620229fcf3 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期四, 27 三月 2025 13:29:53 +0800 Subject: [PATCH] fix:获取累计充值流水 --- LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 9 +++++---- LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 9 +++++++++ LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs | 3 +++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs index 7c812c5..2676cac 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs @@ -11,5 +11,8 @@ public interface ILifePayOrderService : IApplicationService { Task<PageOutput<LifePayRechargeReceiptsListOutput>> GetLifePayRechargeReceiptsPage(LifePayRechargeReceiptsPageInput input); + + Task<decimal> GetTotalLifePayRechargeReceipts(); + Task AddUpdatePayRechargeReceipts(AddUpdatePayRechargeReceiptsInput input); } \ No newline at end of file diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs index 87d9e46..73749e2 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs @@ -50,10 +50,11 @@ return list; } - //public async Task GetTotalLifePayRechargeReceipts() - //{ - - //} + public async Task<decimal> GetTotalLifePayRechargeReceipts() + { + var result = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false).SumAsync(x => x.RechargeAmount); + return result; + } /// <summary> /// 缂栬緫鍏呭�兼祦姘� diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs index ad13e15..e863fd0 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs @@ -441,6 +441,15 @@ return await _lifePayOrderService.GetLifePayRechargeReceiptsPage(input); } + /// <summary> + /// 鑾峰彇绱鍏呭�兼祦姘� + /// </summary> + /// <returns></returns> + [HttpGet] + public async Task<decimal> GetLifePayRechargeReceiptsPage() + { + return await _lifePayOrderService.GetTotalLifePayRechargeReceipts(); + } #endregion -- Gitblit v1.9.1