sunpengfei
15 小时以前 19863208cfdaf01735e75fbdafa33e426e735c04
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;