From 524c87eff1400efe49a26bb46faa49f1a79c464e Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期二, 25 三月 2025 16:28:27 +0800
Subject: [PATCH] fix:导出提款

---
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 03a7e6a..d9596c9 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -246,6 +246,7 @@
     {
         var channles = await _lifePayChannlesRep.Where(x => x.ChannlesName.Contains(input.KeyWords)).Select(x => x.ChannlesNum).ToListAsync();
         var result = await (from a in _channelFilter.GetChannelLifePayOrderFilter(_lifePayOrderRepository)
+                            .Where(x => x.PayStatus != LifePayStatusEnum.鏈敮浠�)
                       .WhereIf(input.BeginFinishTime.HasValue, x => x.FinishTime >= input.BeginFinishTime)
                                             .WhereIf(input.EndFinishTime.HasValue, x => x.FinishTime <= input.EndFinishTime)
                                             .WhereIf(input.BeginPayTime.HasValue, x => x.PayTime >= input.BeginPayTime)
@@ -384,7 +385,7 @@
             s.LifePayOrderTypeStr = s.LifePayOrderType.GetDescription();
             s.RechargeAmountStr = s.RechargeAmount.ToString("F2");
             s.ActualReceivedAmount = s.ActualReceivedAmount;
-            s.LifePayRefundStatusStr = s.LifePayRefundStatus.GetDescription();
+            s.LifePayRefundStatusStr = s.LifePayRefundStatus == LifePayRefundStatusEnum.鏃犻渶閫�娆� ? "" : s.LifePayRefundStatus.GetDescription();
             s.PayAmountStr = s.PayAmount.ToString("F2");
             s.LifePayTypeStr = s.LifePayType.GetDescription();
             s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm);
@@ -732,7 +733,7 @@
             LifePayType = x.LifePayType,
             OrderNo = x.OrderNo,
             PayAmount = x.PayAmount,
-            ActualRechargeAmount = x.ActualRechargeAmount.HasValue?x.ActualRechargeAmount.Value:0,
+            ActualRechargeAmount = x.RechargeAmount,
             PhoneNumber = x.PhoneNumber,
             RechargeAmount = x.RechargeAmount,
             OutOrderNo = x.OutOrderNo,
@@ -758,7 +759,7 @@
             s.LifePayTypeStr = s.LifePayType.GetDescription();
             s.PayStatusStr = s.PayStatus.GetDescription();
             s.ActualRechargeAmountStr = s.ActualRechargeAmount.ToString("F2");
-            s.LifePayRefundStatusStr = s.LifePayRefundStatus.GetDescription();
+            s.LifePayRefundStatusStr = s.LifePayRefundStatus == LifePayRefundStatusEnum.鏃犻渶閫�娆� ? "" : s.LifePayRefundStatus.GetDescription();
             s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription();
             //s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription();
             s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss);
@@ -1022,7 +1023,7 @@
     }
 
     /// <summary>
-    /// 璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷
+    /// 鑾峰彇寰俊鏀粯鐨凧SAPI
     /// </summary>
     /// <param name="input"></param>
     /// <returns></returns>
@@ -1034,6 +1035,8 @@
         CheckExtensions.IfTrueThrowUserFriendlyException(order.LifePayType.HasValue, "褰撳墠璁㈠崟宸查�夋嫨鏀粯绫诲瀷");
 
         order.LifePayType = input.LifePayType;
+        var premium = await _lifePayPremiumRepository.Where(x => x.IsDeleted == false && x.PremiumType == order.LifePayType).FirstOrDefaultAsync();
+        order.PremiumRate = premium == null ? 0 : premium.Rate;
         await _lifePayOrderRepository.UpdateAsync(order);
 
         var desc = "鐢熸椿缂磋垂-";
@@ -1986,6 +1989,7 @@
     {
         var channles = await _lifePayChannlesRep.Where(x => x.ChannlesName.Contains(input.KeyWords)).Select(x => x.ChannlesNum).ToListAsync();
         var result = (from a in _channelFilter.GetChannelLifePayOrderFilter(_lifePayOrderRepository)
+                            .Where(x => x.PayStatus != LifePayStatusEnum.鏈敮浠�)
                       .WhereIf(input.BeginFinishTime.HasValue, x => x.FinishTime >= input.BeginFinishTime)
                                             .WhereIf(input.EndFinishTime.HasValue, x => x.FinishTime <= input.EndFinishTime)
                                             .WhereIf(input.BeginPayTime.HasValue, x => x.PayTime >= input.BeginPayTime)
@@ -2073,6 +2077,7 @@
                                 RefundApplyRemark = a.RefundApplyRemark,
                                 RefundApplyTime = a.RefundApplyTime,
                                 RefundTime = a.RefundTime,
+                                RefundOrderNo = a.RefundOrderNo,
                                 RefundPrice = a.RefundPrice,
                                 ChannelName = b.ChannlesName,
                                 ActualRechargeAmount = a.ActualRechargeAmount,

--
Gitblit v1.9.1