From 2a0c3c001b87b26a87a4264e3f9851d8d76414e3 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期二, 01 四月 2025 11:11:54 +0800 Subject: [PATCH] fix:bug修复 --- LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs index dca8f91..5dd5a70 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs @@ -1,6 +1,7 @@ 锘縰sing Alipay.AopSdk.F2FPay.Model; using LifePayment.Application.Contracts; using LifePayment.Application.LifePay; +using LifePayment.Domain; using LifePayment.Domain.Common; using LifePayment.Domain.Shared; using Microsoft.AspNetCore.Authorization; @@ -524,16 +525,20 @@ public async Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo) { var res = await _lifePayService.WxPayDomesticRefundsQuery(outTradeNo); - await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() + if (res.Code == WxpayResultCode.Success) { - OrderNo = res.OutTradeNo, - OutRefundNo = res.RefundId, - OutOrderNo = res.TransactionId, - LifePayType = LifePayTypeEnum.WxPay, - ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses, - Amount = Convert.ToDecimal(res.Amount.Total) - }); + await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() + { + OrderNo = res.OutTradeNo, + OutRefundNo = res.RefundId, + OutOrderNo = res.TransactionId, + LifePayType = LifePayTypeEnum.WxPay, + ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses, + Amount = Convert.ToDecimal(res.Amount.Total) + }); + } return res; + } /// <summary> -- Gitblit v1.9.1