From 1d03ddefc1b5458eede592d5b5780c3c2b10dfca Mon Sep 17 00:00:00 2001
From: lijin <17408817@qq.com>
Date: 星期四, 20 十一月 2025 09:05:16 +0800
Subject: [PATCH] Merge branch 'dev-818-3.4.2.12' of http://120.26.58.240:8888/r/ApiTools into dev-818-3.4.2.12

---
 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