From f99f2d0410f811f6679149e6a8eea6037b80474a Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 10 九月 2025 09:22:02 +0800
Subject: [PATCH] fix: s

---
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index ddfd419..b658491 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -512,7 +512,7 @@
     public async Task<LifePayRefundOrderOutput> GetLifePayRefundOrderDetail(string orderNo)
     {
         var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync();
-        var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
+        //var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
         var channle = await _lifePayChannlesRep.FirstOrDefaultAsync(r => r.ChannlesNum == order.ChannelId);
         var premium = await _lifePayPremiumRepository.Where(x => x.PremiumType == order.LifePayType).FirstOrDefaultAsync();
         CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "璁㈠崟涓嶅瓨鍦�");
@@ -1145,6 +1145,12 @@
         var amount = CalculateAmount(input.ProductData.ParValue, rate);
         var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
 
+        //TODO 鐩稿叧鍗曢」鎶樻墸璋冭妭鍔熻兘鏈笂绾� 鐩墠閽堝鎯呭喌涓存椂鍐欐
+        if (input.ProductData.ElectricType == "guowang")
+        {
+            platformRate.Rate = 95;
+        }
+
         var orderInput = new CreateLifePayOrderInput
         {
             OrderNo = channle.ChannlesNum + CreateOrderNo(),
@@ -1609,7 +1615,7 @@
             await _lifePayOrderService.CreatLifePayConsumption(acoolyStatus, order.OrderNo, order.ACOOLYOrderNo,
                         order.PlatformDeductionAmount ?? 0, order.ChannelId, order.CreationTime, order.FinishTime, order.ChannleRate, parValue, actualParValue);
 
-            await CurrentUnitOfWork.CompleteAsync();
+            await CurrentUnitOfWork.SaveChangesAsync();
 
             _logger.LogInformation("浜嬪姟瀹屾垚");
         }

--
Gitblit v1.9.1