From 7b47c91bcf89d667a5c99cfafe0d899280f7fbe3 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期三, 19 十一月 2025 11:22:27 +0800
Subject: [PATCH] feat:平安转账开发
---
ApiTools.Application/ChannelWallets/Queries/ChannelWalletQueryHandler.cs | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ApiTools.Application/ChannelWallets/Queries/ChannelWalletQueryHandler.cs b/ApiTools.Application/ChannelWallets/Queries/ChannelWalletQueryHandler.cs
index cbc93a4..59fa35e 100644
--- a/ApiTools.Application/ChannelWallets/Queries/ChannelWalletQueryHandler.cs
+++ b/ApiTools.Application/ChannelWallets/Queries/ChannelWalletQueryHandler.cs
@@ -14,11 +14,28 @@
/// 鏌ヨ娓犻亾閽卞寘浜ゆ槗璇︽儏
/// </summary>
public class ChannelWalletQueryHandler(
+ ChannelWalletRepository channelWalletRepository,
ChannelWalletTransactionRepository channelWalletTransactionRepository
) :
+ IRequestHandler<GetChannelPingAnPayWalletQuery, GetChannelPingAnPayWalletQueryResult>,
IRequestHandler<GetChannelWalletTransactionQuery, GetChannelWalletTransactionQueryResult>
{
+ private readonly ChannelWalletRepository channelWalletRepository = channelWalletRepository;
private readonly ChannelWalletTransactionRepository channelWalletTransactionRepository = channelWalletTransactionRepository;
+
+ /// <summary>
+ /// 鏌ヨ娓犻亾骞冲畨閾惰閽卞寘
+ /// </summary>
+ /// <param name="request"></param>
+ /// <param name="cancellationToken"></param>
+ /// <returns></returns>
+ public async Task<GetChannelPingAnPayWalletQueryResult> Handle(GetChannelPingAnPayWalletQuery request, CancellationToken cancellationToken)
+ {
+ return await channelWalletRepository.GetQueryable()
+ .Where(it => it.OutWalletId == request.OutWalletId)
+ .ProjectToType<GetChannelPingAnPayWalletQueryResult>()
+ .FirstOrDefaultAsync();
+ }
/// <summary>
/// 鏌ヨ娓犻亾閽卞寘浜ゆ槗璇︽儏
@@ -28,11 +45,11 @@
/// <returns></returns>
public async Task<GetChannelWalletTransactionQueryResult> Handle(GetChannelWalletTransactionQuery request, CancellationToken cancellationToken)
{
- var logier = JwtUtils.GetCurrentLogier();
return await channelWalletTransactionRepository.GetQueryable()
- .Where(it => it.Wallet.ChannelId == logier.ChannelId && it.OutCode == request.OutCode)
+ .Where(it => it.OutCode == request.OutCode)
.ProjectToType<GetChannelWalletTransactionQueryResult>()
.FirstOrDefaultAsync();
}
+
}
}
--
Gitblit v1.9.1