zhengyuxuan
2025-03-27 0497d15d3b0341cb4ab99142a25463620229fcf3
fix:获取累计充值流水
3个文件已修改
21 ■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
}
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>
        /// 编辑充值流水
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