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/Commands/ChannelWalletCommandHandler.cs | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ApiTools.Application/ChannelWallets/Commands/ChannelWalletCommandHandler.cs b/ApiTools.Application/ChannelWallets/Commands/ChannelWalletCommandHandler.cs
index 3feb977..0fd2503 100644
--- a/ApiTools.Application/ChannelWallets/Commands/ChannelWalletCommandHandler.cs
+++ b/ApiTools.Application/ChannelWallets/Commands/ChannelWalletCommandHandler.cs
@@ -29,6 +29,12 @@
private readonly ChannelWalletTransactionRepository channelWalletTransactionRepository = channelWalletTransactionRepository;
private readonly ChannelWalletService channelWalletService = channelWalletService;
+ /// <summary>
+ /// 淇濆瓨娓犻亾骞冲畨閾惰閽卞寘
+ /// </summary>
+ /// <param name="request"></param>
+ /// <param name="cancellationToken"></param>
+ /// <returns></returns>
public async Task<SaveChannelPingAnPayWalletCommandResult> Handle(SaveChannelPingAnPayWalletCommand request, CancellationToken cancellationToken)
{
var logier = JwtUtils.GetCurrentLogier();
@@ -40,23 +46,23 @@
wallet = new ChannelWallet();
wallet.ChannelId = logier.ChannelId;
wallet.Access = EnumWalletAccess.PingAnPay;
- wallet.SignStatus = EnumWalletSignStatus.Normal;
+ wallet.Bank = "骞冲畨閾惰";
+ wallet.SignStatus = EnumWalletSignStatus.Apply;
request.Adapt(wallet);
await channelWalletRepository.SetCode(wallet);
await channelWalletRepository.InsertNowAsync(wallet);
}
else
{
+ wallet.SignStatus = EnumWalletSignStatus.Apply;
request.Adapt(wallet);
await channelWalletRepository.UpdateNowAsync(wallet);
}
await channelWalletService.GetEnterpriseWalletBalance(wallet);
return new SaveChannelPingAnPayWalletCommandResult
{
- WalletId = wallet.Id,
+ Id = wallet.Id,
Balance = wallet.Balance,
- ErrorCode = wallet.ErrorCode,
- FailReason = wallet.FailReason
};
}
@@ -80,7 +86,7 @@
.FirstOrDefaultAsync();
if (wallet == null) throw Oops.Oh(EnumErrorCodeType.s404, "鏈紑閫氶挶鍖�");
-
+ if (wallet.SignStatus != EnumWalletSignStatus.Normal) throw Oops.Oh(EnumErrorCodeType.s404, "閽卞寘鏈绾�");
await channelWalletService.GetEnterpriseWalletBalance(wallet);
if (request.Amount > wallet.Balance) throw Oops.Oh(EnumErrorCodeType.s404, "浣欓涓嶈冻");
--
Gitblit v1.9.1