From fa48f8996e9e829bc9352863596011d1e0e95490 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期二, 10 六月 2025 16:32:25 +0800
Subject: [PATCH] fix:运营端——渠道管理——渠道管理(渠道折扣接口请求进行编辑可低于供应商折扣)

---
 LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
index d5bead3..de9e04b 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
@@ -11,6 +11,7 @@
 using Volo.Abp.AspNetCore.Mvc;
 using Volo.Abp.Caching;
 using Volo.Abp.Uow;
+using ZeroD.Util;
 
 namespace LifePayment.HttpApi
 {
@@ -52,19 +53,22 @@
         {
             try
             {
-                _logger.LogError($"鐢熸椿绠″寰俊鍏呭�煎洖璋冮�氱煡锛氳繘鍏ュ井淇″洖璋�:");
+                var req = input.ToJson();
+                _logger.LogInformation($"鐢熸椿绠″寰俊鍏呭�煎洖璋冮�氱煡锛氳繘鍏ュ井淇″洖璋�:" + req);
                 var data = _wxPayApi.AesGcmDecrypt(input.Resource.AssociatedData, input.Resource.Nonce, input.Resource.Ciphertext);
-                _logger.LogError($"鐢熸椿绠″寰俊鍏呭�煎洖璋冮�氱煡data锛�" + data);
+                _logger.LogInformation($"鐢熸椿绠″寰俊鍏呭�煎洖璋冮�氱煡data锛�" + data);
                 var wxPayNotice = JsonConvert.DeserializeObject<WxPayNotice>(data);
 
-                if (wxPayNotice.OutTradeNo.Contains("JF") )
+                if (wxPayNotice.OutTradeNo.Contains("JF"))
                 {
                     if (wxPayNotice.TradeState == LifePaymentConstant.WxPayStatus.鏀粯鎴愬姛)
                     {
                         var key = $"WxRechargeNotify_{wxPayNotice.OutTradeNo}";
                         if (string.IsNullOrWhiteSpace(distributedCache.Get(key)))
                         {
+                            _logger.LogInformation("姝e湪澶勭悊鍥炶皟");
                             await _lifePayService.LifePaySuccessHandler(wxPayNotice.OutTradeNo, wxPayNotice.TransactionId);
+                            _logger.LogInformation("宸插鐞嗗洖璋�");
 
                             // 鎻掑叆鏀舵敮娴佹按
                             await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
@@ -75,13 +79,26 @@
                                 ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
                                 Amount = wxPayNotice.Amount.Total
                             });
+                            _logger.LogInformation("宸叉彃鍏ユ敹鏀祦姘�");
 
                             distributedCache.Set(key, data, new DistributedCacheEntryOptions
                             {
                                 AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(10)
                             });
                         }
+                        else
+                        {
+                            _logger.LogInformation("宸茶繃婊ら噸澶嶈姹�");
+                        }
                     }
+                    else
+                    {
+                        _logger.LogInformation("浜ゆ槗鐘舵�佷笉绗﹀悎瑙勫垯");
+                    }
+                }
+                else
+                {
+                    _logger.LogInformation("璁㈠崟鍙蜂笉绗﹀悎瑙勫垯");
                 }
             }
             catch (Exception ex)
@@ -113,12 +130,12 @@
             {
                 _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡锛氳繘鍏ュ井淇″洖璋�");
                 var data = _wxPayApi.AesGcmDecrypt(input.Resource.AssociatedData, input.Resource.Nonce, input.Resource.Ciphertext);
-                _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡data锛�"+ data);
+                _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡data锛�" + data);
                 var wxPayNotice = JsonConvert.DeserializeObject<WxPayDomesticRefundsNotice>(data);
 
                 if (wxPayNotice.OutTradeNo.Contains("JF"))
                 {
-                   
+
                     switch (wxPayNotice.RefundStatus)
                     {
                         case LifePaymentConstant.WxPayRefundStatus.閫�娆炬垚鍔�:
@@ -139,13 +156,13 @@
                         case LifePaymentConstant.WxPayRefundStatus.閫�娆惧紓甯�:
                             await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑);
                             break;
-                        default : await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑);break;
+                        default: await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); break;
                     }
                 }
             }
             catch (Exception ex)
             {
-                
+
                 return new WxRechargeNotifyResult
                 {
                     Code = "FAIL",

--
Gitblit v1.9.1