From 19863208cfdaf01735e75fbdafa33e426e735c04 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期五, 12 九月 2025 15:09:41 +0800
Subject: [PATCH] feat:开发

---
 FlexJobApi.UserServer.Application/EnterpriseWallets/Queries/EnterpriseWalletQueryHandler.cs |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/FlexJobApi.UserServer.Application/EnterpriseWallets/Queries/EnterpriseWalletQueryHandler.cs b/FlexJobApi.UserServer.Application/EnterpriseWallets/Queries/EnterpriseWalletQueryHandler.cs
index a2e4c86..b9dd551 100644
--- a/FlexJobApi.UserServer.Application/EnterpriseWallets/Queries/EnterpriseWalletQueryHandler.cs
+++ b/FlexJobApi.UserServer.Application/EnterpriseWallets/Queries/EnterpriseWalletQueryHandler.cs
@@ -154,18 +154,6 @@
                     }
                 }
 
-                if (entity.AccountBookStatus == EnumEnterpriseWalletAccountBookStatus.Normal)
-                {
-                    var response = alipayUtils.FundAccountbookQuery(new AlipayFundAccountbookQueryModel
-                    {
-                        AccountBookId = entity.AccountBookId,
-                        SceneCode = "SATF_FUND_BOOK",
-                        MerchantUserId = entity.Code,
-                    });
-                    if (response.IsError) throw Oops.Oh(EnumErrorCodeType.s510, response.SubMsg ?? response.Msg);
-                    entity.Balance = response.AvailableAmount.ToDecimal() ?? 0;
-                    update = true;
-                }
             }
 
             if (update)
@@ -217,6 +205,23 @@
             else
             {
                 model.ExpandindirectOrderStatus = EnumEnterpriseWalletExpandindirectOrderStatus.Wait;
+            }
+
+            if (entity.AccountBookStatus == EnumEnterpriseWalletAccountBookStatus.Normal)
+            {
+                var response = alipayUtils.FundAccountbookQuery(new AlipayFundAccountbookQueryModel
+                {
+                    AccountBookId = entity.AccountBookId,
+                    SceneCode = "SATF_FUND_BOOK",
+                    MerchantUserId = entity.Code,
+                    ExtInfo = new
+                    {
+                        agreement_no = entity.AgreementNo
+                    }.ToJson()
+                });
+                if (response.IsError) throw Oops.Oh(EnumErrorCodeType.s510, response.SubMsg ?? response.Msg);
+                entity.Balance = response.AvailableAmount.ToDecimal() ?? 0;
+                await rep.UpdateNowAsync(entity);
             }
 
             return model;
@@ -296,6 +301,10 @@
                 AccountBookId = entity.AccountBookId,
                 SceneCode = "SATF_FUND_BOOK",
                 MerchantUserId = entity.Code,
+                ExtInfo = new
+                {
+                    agreement_no = entity.AgreementNo
+                }.ToJson()
             });
             if (response.IsError) throw Oops.Oh(EnumErrorCodeType.s510, response.SubMsg ?? response.Msg);
             entity.Balance = response.AvailableAmount.ToDecimal() ?? 0;

--
Gitblit v1.9.1