From 83b72e32a89988dd721ef7bc8ea673751092fb4a Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 10 十二月 2025 16:11:13 +0800
Subject: [PATCH] fix: bug

---
 LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs    |   10 +++++-----
 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs |    4 ++--
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs         |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
index 8ee5f0c..e6fe93c 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
@@ -911,12 +911,12 @@
     /// <summary>
     /// 閫�娆剧敵璇锋椂闂�
     /// </summary>
-    public DateTime RefundTime { get; set; }
+    public DateTime? RefundTime { get; set; }
 
     /// <summary>
     /// 閫�娆炬垚鍔熸椂闂�
     /// </summary>
-    public DateTime RefundSuccessTime { get; set; }
+    public DateTime? RefundSuccessTime { get; set; }
 
     public RefundPlatformStatusEnum RefundPlatformStatus { get; set; }
 
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
index 002a208..da0c289 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
@@ -357,9 +357,9 @@
                 result.RefundOrderNo = order.RefundOrderNo;
                 result.OutOrderNo = query.TradeNo;
                 result.LifePayType = LifePayTypeEnum.AliPay;
-                result.RefundTime = Convert.ToDateTime(order.RefundTime);
-                result.RefundSuccessTime = Convert.ToDateTime(query.GmtRefundPay);
-                result.RefundPlatformStatus = MapWxpayRefundStatusToPlatformEnum(query.RefundStatus);
+                result.RefundTime = order.RefundTime;
+                result.RefundSuccessTime = query.GmtRefundPay.IsNullOrEmpty() ? null : Convert.ToDateTime(query.GmtRefundPay);
+                result.RefundPlatformStatus = MapAlipayRefundStatusToPlatformEnum(query.RefundStatus);
             }
             else if (order.LifePayType == LifePayTypeEnum.WxPay)
             {
@@ -368,8 +368,8 @@
                 result.RefundOrderNo = order.RefundOrderNo;
                 result.OutOrderNo = query.TransactionId;
                 result.LifePayType = LifePayTypeEnum.WxPay;
-                result.RefundTime = Convert.ToDateTime(query.CreateTime);
-                result.RefundSuccessTime = Convert.ToDateTime(query.SuccessTime);
+                result.RefundTime = query.CreateTime.IsNullOrEmpty() ? null : Convert.ToDateTime(query.CreateTime);
+                result.RefundSuccessTime = query.SuccessTime.IsNullOrEmpty() ? null : Convert.ToDateTime(query.SuccessTime);
                 result.RefundPlatformStatus = MapWxpayRefundStatusToPlatformEnum(query.Status);
             }
 
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index b370b07..4d18168 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -1595,7 +1595,7 @@
                 return;
             }
 
-            if (order.LifePayOrderStatus == LifePayOrderStatusEnum.宸查��娆�)
+            if (order.LifePayOrderStatus == LifePayOrderStatusEnum.宸查��娆� || order.LifePayOrderStatus == LifePayOrderStatusEnum.閫�娆句腑)
             {
                 _logger.LogInformation($"璁㈠崟宸查��娆�,涓嶅湪澶勭悊");
                 return;

--
Gitblit v1.9.1