From d0ca4c5479641ac5616d1e6fd2c258aea7d93222 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期三, 02 四月 2025 13:28:28 +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 86e012c..c8f1967 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -1194,11 +1194,7 @@
             OutOrderNo = orderNo
         };
         var result = await _aCOOLYManager.ConfirmElectricOrder(requestInput);
-#if DEBUG
-
         _logger.LogInformation($"CreateACOOLYElectricOrder:{JsonConvert.SerializeObject(result)}");
-
-#endif
 
         CheckExtensions.IfTrueThrowUserFriendlyException(!result.Success || (result.Code != ACOOLYConstant.Code.SUCCESS && result.Code != ACOOLYConstant.Code.PROCESSING),
                                                         result.Message);
@@ -1318,6 +1314,7 @@
         order.PayStatus = LifePayStatusEnum.宸叉敮浠�;
         order.PayTime = DateTime.Now;
         order.OutOrderNo = outOrderNo;
+
         try
         {
             var result = (Code: "Fail", RequestNo: "", ACOOLYOrderNo: "");
@@ -1342,6 +1339,10 @@
             order.OutRequestNo = result.RequestNo.IsNullOrEmpty() ? null : result.RequestNo;
             order.ACOOLYOrderNo = result.ACOOLYOrderNo;
             order.ACOOLYStatus = ACOOLYStatusEnum.鍏呭�间腑;
+
+            /// 鍒涘缓鐢熸椿缂磋垂娑堣垂璁板綍
+            await _lifePayOrderService.CreatLifePayConsumption(ACOOLYStatusEnum.鍏呭�间腑, order.OrderNo, order.ACOOLYOrderNo,
+                                order.PlatformDeductionAmount ?? 0, order.ChannelId, order.CreationTime, order.FinishTime);
         }
         catch (Exception ex)
         {
@@ -1433,6 +1434,10 @@
                 await _lifePayChannlesRakeRepository.InsertAsync(lifePayChannlesRake);
             }
         }
+
+        /// 鍒涘缓鐢熸椿缂磋垂娑堣垂璁板綍
+        await _lifePayOrderService.CreatLifePayConsumption(acoolyStatus, order.OrderNo, order.ACOOLYOrderNo,
+                    order.PlatformDeductionAmount ?? 0, order.ChannelId, order.CreationTime, order.FinishTime);
     }
 
     /// <summary>

--
Gitblit v1.9.1