From 31482ebd19de604e6c98df6962ad28adf71b784e Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期五, 28 三月 2025 13:04:06 +0800
Subject: [PATCH] fix:接口更新

---
 LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml |    7 +++
 LifePayment/LifePayment.Domain/WeChat/IWxPayApi.cs                         |    4 +
 LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs               |   10 +++-
 LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs   |    9 ++++
 LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml                |    7 +++
 LifePayment/LifePayment.Domain/WeChat/WxPayApi.cs                          |    9 ++++
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs              |   15 ++++++-
 LifePayment/LifePayment.Domain.Shared/WeChat/WxPayPostBaseModel.cs         |   15 ++++++-
 8 files changed, 66 insertions(+), 10 deletions(-)

diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
index 06405b2..17f30cc 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
@@ -291,7 +291,14 @@
     /// </summary>
     /// <param name="outTradeNo"></param>
     /// <returns></returns>
-    Task WxPayDomesticRefundsQuery(string outTradeNo);
+    Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo);
+
+    /// <summary>
+    /// 鏌ヨ寰俊璁㈠崟淇℃伅
+    /// </summary>
+    /// <param name="outTradeNo"></param>
+    /// <returns></returns>
+    Task WxPayTradeQuery(string outTradeNo);
 
     /// <summary>
     /// 璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 2a8e236..9144d0f 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -848,9 +848,19 @@
     /// </summary>
     /// <param name="outTradeNo"></param>
     /// <returns></returns>
-    public async Task WxPayDomesticRefundsQuery(string outTradeNo)
+    public async Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo)
     {
-        await _wxPayApi.WxPayDomesticRefundsQuery(outTradeNo);
+        return await _wxPayApi.WxPayDomesticRefundsQuery(outTradeNo);
+    }
+
+    /// <summary>
+    /// 鏌ヨ寰俊璁㈠崟淇℃伅
+    /// </summary>
+    /// <param name="outTradeNo"></param>
+    /// <returns></returns>
+    public async Task WxPayTradeQuery(string outTradeNo)
+    {
+        await _wxPayApi.WxPayTradeQuery(outTradeNo);
     }
 
     #endregion
@@ -2156,6 +2166,7 @@
             return channel.ChannlesRate;
         }
     }
+
     public async Task<SetPayTypeReturn> SetPayType(string orderNo, LifePayTypeEnum lifePayType, string ip)
     {
         var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync();
diff --git a/LifePayment/LifePayment.Domain.Shared/WeChat/WxPayPostBaseModel.cs b/LifePayment/LifePayment.Domain.Shared/WeChat/WxPayPostBaseModel.cs
index d088224..ec9af73 100644
--- a/LifePayment/LifePayment.Domain.Shared/WeChat/WxPayPostBaseModel.cs
+++ b/LifePayment/LifePayment.Domain.Shared/WeChat/WxPayPostBaseModel.cs
@@ -806,6 +806,17 @@
     public class WxPayDomesticRefundsQueryReponse
     {
         /// <summary>
+        /// 杩斿洖缁撴灉
+        /// </summary>
+        [JsonProperty("code")]
+        public string Code { get; set; }
+        /// <summary>
+        /// 杩斿洖淇℃伅
+        /// </summary>
+        [JsonProperty("message")]
+        public string Message { get; set; }
+
+        /// <summary>
         /// 寰俊鏀粯閫�娆惧崟鍙�
         /// </summary>
         [JsonProperty("refund_id ")]
@@ -859,7 +870,7 @@
         /// 閲戦淇℃伅
         /// </summary>
         [JsonProperty("amount")]
-        public string Amount { get; set; }
+        public Model_WxPayDomesticRefunds_Amount Amount { get; set; }
     }
-
+    
 }
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Domain/WeChat/IWxPayApi.cs b/LifePayment/LifePayment.Domain/WeChat/IWxPayApi.cs
index 410e790..71a8a56 100644
--- a/LifePayment/LifePayment.Domain/WeChat/IWxPayApi.cs
+++ b/LifePayment/LifePayment.Domain/WeChat/IWxPayApi.cs
@@ -24,7 +24,9 @@
 
         Task<WxPayDomesticRefundsReponse> WxPayDomesticRefunds(WxPayDomesticRefundsRequest input);
 
-        Task WxPayDomesticRefundsQuery(string outTradeNo);
+        Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo);
+
+        Task WxPayTradeQuery(string outTradeNo);
 
         Task<WxPayTradeBillApplyReponse> WxPayTradeBillApply(WxPayTradeBillApplyRequest input);
 
diff --git a/LifePayment/LifePayment.Domain/WeChat/WxPayApi.cs b/LifePayment/LifePayment.Domain/WeChat/WxPayApi.cs
index c84208a..6293c95 100644
--- a/LifePayment/LifePayment.Domain/WeChat/WxPayApi.cs
+++ b/LifePayment/LifePayment.Domain/WeChat/WxPayApi.cs
@@ -36,10 +36,17 @@
             return result;
         }
 
-        public async Task WxPayDomesticRefundsQuery(string outTradeNo)
+        public async Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo)
         {
             var url = $"{string.Format(LifePaymentConstant.WxPayDomesticRefundsQuery, outTradeNo)}";
             var result = await Certificates<WxPayDomesticRefundsQueryReponse>(url);
+            return result;
+        }
+
+        public async Task WxPayTradeQuery(string outTradeNo)
+        {
+            var url = $"{string.Format(LifePaymentConstant.WxPayTradeQyery, outTradeNo)}";
+            var result = await Certificates<WxPayDomesticRefundsQueryReponse>(url);
         }
 
         public async Task<WxPayTradeBillApplyReponse> WxPayTradeBillApply(WxPayTradeBillApplyRequest input)
diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
index c73c90b..b06badd 100644
--- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -281,6 +281,13 @@
             <param name="input"></param>
             <returns></returns>
         </member>
+        <member name="M:LifePayment.HttpApi.LifePayController.WxPayDomesticRefundsQuery(System.String)">
+            <summary>
+            鏌ヨ寰俊閫�娆句俊鎭�
+            </summary>
+            <param name="outTradeNo"></param>
+            <returns></returns>
+        </member>
         <member name="M:LifePayment.HttpApi.LifePayController.CreateLifePayPhoneOrder(LifePayment.Application.Contracts.CreateLifePayOrderInput{LifePayment.Application.Contracts.LifePhoneData})">
             <summary>
             鍒涘缓鐢熸椿缂磋垂璇濊垂璁㈠崟
diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
index b9a91d2..95c97c8 100644
--- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -253,6 +253,13 @@
             <param name="outTradeNo"></param>
             <returns></returns>
         </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayService.WxPayTradeQuery(System.String)">
+            <summary>
+            鏌ヨ寰俊璁㈠崟淇℃伅
+            </summary>
+            <param name="outTradeNo"></param>
+            <returns></returns>
+        </member>
         <member name="M:LifePayment.Application.Contracts.ILifePayService.SetLifePayOrderPayType(LifePayment.Domain.Shared.SetLifePayOrderPayTypeInput,System.String)">
             <summary>
             璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index d0f5172..9cef37a 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -466,12 +466,16 @@
             return await _lifePayService.QueryAlipayTradeRefund(input);
         }
 
-
+        /// <summary>
+        /// 鏌ヨ寰俊閫�娆句俊鎭�
+        /// </summary>
+        /// <param name="outTradeNo"></param>
+        /// <returns></returns>
         [HttpGet]
         [AllowAnonymous]
-        public async Task WxPayDomesticRefundsQuery(string outTradeNo)
+        public async Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo)
         {
-            await _lifePayService.WxPayDomesticRefundsQuery(outTradeNo);
+            return await _lifePayService.WxPayDomesticRefundsQuery(outTradeNo);
         }
 
         #endregion

--
Gitblit v1.9.1