From 87095b4a2d3e342f4374423b22d90f0ed6557a7d Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期三, 02 四月 2025 14:45:32 +0800 Subject: [PATCH] fix:bug修复 --- LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs index 0d81181..cef804e 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs @@ -183,7 +183,13 @@ }) .GetPageResult(input.PageModel); - var totalRakePrice = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false).SumAsync(x => x.ChannlesRakePrice); + var totalRakePrice = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false) + .WhereIf(input.ChannelId.IsNotNullOrEmpty(), x => x.ChannelId == input.ChannelId) + .WhereIf(input.CreationTimeBegin.HasValue, x => x.CreationTime >= input.CreationTimeBegin) + .WhereIf(input.CreationTimeEnd.HasValue, x => x.CreationTime <= input.CreationTimeEnd) + .WhereIf(input.FinishTimeBegin.HasValue, x => x.FinishTime >= input.FinishTimeBegin) + .WhereIf(input.FinishTimeEnd.HasValue, x => x.FinishTime <= input.FinishTimeEnd) + .SumAsync(x => x.ChannlesRakePrice); LifePayLifePayChannlesRakeStatistics objectData = new LifePayLifePayChannlesRakeStatistics(); objectData.TotalRakePrice = totalRakePrice; @@ -374,6 +380,10 @@ } } + /// <summary> + /// 缁熻鎵�鏈夋敹鏀祦姘� + /// </summary> + /// <returns></returns> public async Task GetAllLifePayExpensesReceipts() { var orderlist = await (from a in _lifePayOrderRepository.Where(x => x.PayStatus >= LifePayStatusEnum.宸叉敮浠�) @@ -427,7 +437,8 @@ /// 姣涘埄 var grossProfit = item.RechargeAmount * (item.ChannleRate - item.PlatformRate) / 100; /// 娓犻亾浣i噾 锛�(鍏呭�奸潰棰� * 娓犻亾鎶樻墸姣斾緥)-(鍏呭�奸潰棰� * 骞冲彴鎶樻墸姣斾緥)锛�* 浣i噾姣斾緥 - var channlesRakePrice = grossProfit * (item.ChannlesRakeRate) / 100; + var channlesRakePrice = grossProfit * item.ChannlesRakeRate / 100; + if (channlesRakePrice.HasValue) { LifePayChannlesRake lifePayChannlesRake = new LifePayChannlesRake() -- Gitblit v1.9.1