From f4a07605ede31f0525aa592ce2202e44bff46cbe Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 31 三月 2025 14:37:07 +0800 Subject: [PATCH] Merge branch 'dev-lifepay-v1.3' of http://120.26.58.240:8888/r/LifePaymentApi into dev-lifepay-v1.3 --- LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index 1b8a173..41fde74 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -46,6 +46,7 @@ private readonly IRepository<LifePayChannles, Guid> _lifePayChannlesRep; private readonly IRepository<LifePayAccount, Guid> _lifePayAccount; private readonly IRepository<OperateHistory, Guid> _operateHistory; + private readonly IRepository<LifePayChannlesRake, Guid> _lifePayChannlesRakeRepository; private readonly IDataFilter dataFilter; private readonly IChannelFilter _channelFilter; private readonly IAliPayApi _aliPayApi; @@ -64,6 +65,7 @@ IRepository<LifePayUser, Guid> lifePayUserRepository, IRepository<LifePayPremium, Guid> lifePayPremiumRepository, IRepository<LifePayIntroInfo, Guid> lifePayIntroInfoRepository, + IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository, IRepository<OperateHistory, Guid> operateHistory, IAliPayApi aliPayApi, IAlipayInterfaceManager aliPayInterfaceManager, @@ -80,6 +82,7 @@ _lifePayRateRepository = lifePayRateRepository; _lifePayOrderRepository = lifePayOrderRepository; _lifePayUserRepository = lifePayUserRepository; + _lifePayChannlesRakeRepository = lifePayChannlesRakeRepository; _lifePayPremiumRepository = lifePayPremiumRepository; _lifePayIntroInfoRepository = lifePayIntroInfoRepository; _aliPayApi = aliPayApi; @@ -1372,6 +1375,27 @@ order.ACOOLYStatus = acoolyStatus; order.FinishTime = DateTime.Now; await _lifePayOrderRepository.UpdateAsync(order); + + if (order.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) + { + /// 姣涘埄 + var grossProfit = order.RechargeAmount * (order.ChannleRate - order.PlatformRate) / 100; + /// 娓犻亾浣i噾 锛�(鍏呭�奸潰棰� * 娓犻亾鎶樻墸姣斾緥)-(鍏呭�奸潰棰� * 骞冲彴鎶樻墸姣斾緥)锛�* 浣i噾姣斾緥 + var channlesRakePrice = grossProfit * (order.ChannlesRakeRate) / 100; + if (channlesRakePrice.HasValue) + { + LifePayChannlesRake lifePayChannlesRake = new LifePayChannlesRake() + { + OrderNo = order.OrderNo, + PayAmount = order.PayAmount.Value, + ChannlesRakeRate = order.ChannlesRakeRate.Value, + ChannlesRakePrice = channlesRakePrice.Value, + FinishTime = order.FinishTime.Value, + ChannelId = order.ChannelId, + }; + await _lifePayChannlesRakeRepository.InsertAsync(lifePayChannlesRake); + } + } } /// <summary> @@ -2015,7 +2039,6 @@ string message = $"{method}\n{uri}\n{timestamp}\n{nonce}\n{body}\n"; return message; } - private async Task<IQueryable<LifePayOrderListOutput>> GetLifePayOrderListFilter(QueryLifePayOrderListInput input) { -- Gitblit v1.9.1