From 6803ee52d2061fb811440fd17aede81250f0a53b Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期五, 28 三月 2025 15:51:39 +0800
Subject: [PATCH] fix:提交能运行的代码
---
LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 45 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 44 insertions(+), 1 deletions(-)
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
index 6eb97db..b6c399e 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
@@ -12,6 +12,7 @@
using Microsoft.EntityFrameworkCore;
using ZeroD.Util;
using LifePayment.Domain;
+using static LifePayment.Domain.Shared.LifePaymentConstant;
namespace LifePayment.Application.LifePay
{
@@ -99,6 +100,31 @@
}
}
+
+ //public async Task<LifePayExpensesReceiptsPageOutput<LifePayExpensesReceiptsListOutput>> GetLifePayExpensesReceiptsPage(LifePayExpensesReceiptsPageInput input)
+ //{
+ // var list = await _lifePayExpensesReceiptsRepository.Where(x => x.IsDeleted == false)
+ // .WhereIf(input.KeyWord.IsNotNullOrEmpty(), x => x.OrderNo.Contains(input.KeyWord))
+ // .WhereIf(input.CreationTimeBegin.HasValue, x => x.CreationTime >= input.CreationTimeBegin)
+ // .WhereIf(input.CreationTimeEnd.HasValue, x => x.CreationTime <= input.CreationTimeEnd)
+ // .Select(x => new LifePayRechargeReceiptsListOutput()
+ // {
+ // Id = x.Id,
+ // OrderNo = x.OrderNo,
+ // RechargeAmount = x.RechargeAmount,
+ // Remark = x.Remark,
+ // Voucher = x.Voucher.GetOssPath(),
+ // CreationTime = x.CreationTime,
+ // })
+ // .GetPageResult(input.PageModel);
+
+ // var total = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false).SumAsync(x => x.RechargeAmount);
+ // LifePayRechargeReceiptsPageOutput<LifePayRechargeReceiptsListOutput> result = new LifePayRechargeReceiptsPageOutput<LifePayRechargeReceiptsListOutput>();
+ // result.Data = list.Data;
+ // result.TotalRechargeAmount = total;
+ // return result;
+ //}
+
/// <summary>
/// 鎻掑叆鏀舵敮娴佹按
/// </summary>
@@ -140,7 +166,24 @@
}
}
break;
- case LifePayTypeEnum.WxPay: break;
+ case LifePayTypeEnum.WxPay:
+ if (input.ExpensesReceiptsType == ExpensesReceiptsTypeEnum.Expenses)
+ {
+ var query = await _wxPayApi.WxPayTradeQuery(input.OrderNo);
+ if (query.Code == AlipayResultCode.Success && query.Status == WxPayStatus.鏀粯鎴愬姛)
+ {
+ await _lifePayExpensesReceiptsRepository.InsertAsync(data);
+ }
+ }
+ else
+ {
+ var query = await _wxPayApi.WxPayDomesticRefundsQuery(input.OrderNo);
+ if (query.Code == AlipayResultCode.Success && query.RefundStatus == WxPayRefundStatus.閫�娆炬垚鍔�)
+ {
+ await _lifePayExpensesReceiptsRepository.InsertAsync(data);
+ }
+ }
+ break;
default: break;
}
--
Gitblit v1.9.1