From 85de4f8a1ef46f61e57b4ec375186122c23a3212 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期四, 27 三月 2025 15:10:45 +0800
Subject: [PATCH] fix:新增支付宝查询

---
 LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs             |   16 ++++++++++++++--
 LifePayment/LifePayment.Domain/Ali/IAliPayApi.cs                         |    2 +-
 LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs |    5 ++++-
 LifePayment/LifePayment.Domain/Ali/AliPayApi.cs                          |    2 +-
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs            |    9 +++++++++
 LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs        |    5 ++++-
 6 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
index 81e6737..4b951cd 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
@@ -1,4 +1,5 @@
-锘縰sing LifePayment.Domain.Shared;
+锘縰sing Alipay.EasySDK.Payment.Common.Models;
+using LifePayment.Domain.Shared;
 using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
@@ -271,6 +272,8 @@
 
     Task<string> GetBillErceiptExport(string orderNo);
 
+    Task<AlipayTradeQueryResponse> QueryGetAlipayTrade(OrderInQuiryInput input);
+
     /// <summary>
     /// 璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷
     /// </summary>
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 544d13e..3645623 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -820,6 +820,15 @@
             return "";
         }
     }
+
+    public async Task<AlipayTradeQueryResponse> QueryGetAlipayTrade(OrderInQuiryInput input)
+    {
+        var result = await _aliPayApi.OrderInQuiry(input);
+        return result;
+    }
+
+
+
     #endregion
 
     #region 鎿嶄綔
diff --git a/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs b/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs
index daf94ef..4174021 100644
--- a/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs
+++ b/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs
@@ -29,7 +29,7 @@
             return response;
         }
 
-        public AlipayTradeQueryResponse OrderInQuiry(OrderInQuiryInput input)
+        public async Task<AlipayTradeQueryResponse> OrderInQuiry(OrderInQuiryInput input)
         {
             AlipayTradeQueryResponse response = Factory.Payment.Common().Query(input.OutTradeNo);
             return response;
diff --git a/LifePayment/LifePayment.Domain/Ali/IAliPayApi.cs b/LifePayment/LifePayment.Domain/Ali/IAliPayApi.cs
index 8759070..fa58cc9 100644
--- a/LifePayment/LifePayment.Domain/Ali/IAliPayApi.cs
+++ b/LifePayment/LifePayment.Domain/Ali/IAliPayApi.cs
@@ -10,7 +10,7 @@
     {
         Task<AlipayTradePrecreateResponse> GetAliPayQRCode(GetPayQrCodeInput input);
 
-        AlipayTradeQueryResponse OrderInQuiry(OrderInQuiryInput input);
+        Task<AlipayTradeQueryResponse> OrderInQuiry(OrderInQuiryInput input);
 
         Task<AlipayTradeRefundResponse> TradeRefund(AlipayTradeRefundRequest input);
     }
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs
index 3d41c9c..300150a 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs
@@ -1,4 +1,5 @@
-锘縰sing LifePayment.Application.Contracts;
+锘縰sing Alipay.AopSdk.F2FPay.Model;
+using LifePayment.Application.Contracts;
 using LifePayment.Domain.Shared;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
@@ -90,6 +91,8 @@
             };
         }
 
+
+        
 #endif
 
         /// <summary>
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index 08b9b62..d3327f8 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -1,4 +1,5 @@
-锘縰sing LifePayment.Application.Contracts;
+锘縰sing Alipay.AopSdk.F2FPay.Model;
+using LifePayment.Application.Contracts;
 using LifePayment.Application.LifePay;
 using LifePayment.Domain.Common;
 using LifePayment.Domain.Shared;
@@ -441,7 +442,18 @@
             return await _lifePayOrderService.GetLifePayRechargeReceiptsPage(input);
         }
 
-        
+        /// <summary>
+        /// 鏌ヨ鏀粯瀹濊鍗曚俊鎭�
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<Alipay.EasySDK.Payment.Common.Models.AlipayTradeQueryResponse> QueryGetAlipayTrade(OrderInQuiryInput input)
+        {
+            return await _lifePayService.QueryGetAlipayTrade(input);
+        }
+
         #endregion
 
         #region 鎿嶄綔

--
Gitblit v1.9.1