From e483bacd81cb4bf6dedc07cd1aac5a91eee0da8d Mon Sep 17 00:00:00 2001 From: wtp <1813748440@qq.com> Date: Thu, 23 Mar 2023 17:13:14 +0800 Subject: [PATCH] TS --- GDZZ.Application/Service/WXPay/WXPayService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/GDZZ.Application/Service/WXPay/WXPayService.cs b/GDZZ.Application/Service/WXPay/WXPayService.cs index 4e2a5e9..14d7aa7 100644 --- a/GDZZ.Application/Service/WXPay/WXPayService.cs +++ b/GDZZ.Application/Service/WXPay/WXPayService.cs @@ -203,9 +203,17 @@ namespace GDZZ.Application.Service.WXPay var balan = await this.balance.AsQueryable().Filter("TenantId", true).Where(x => x.UserID == paytake.CreatedUserId).SingleAsync(); if (!balan.IsEmpty()) { - balan.Amount += recharge.PaymentMoney; + balan.Amount = recharge.PaymentMoney; this.balance.Update(balan); } + else + { + this.balance.Insert(new Balance() + { + Amount = recharge.PaymentMoney, + UserID = (long)paytake.CreatedUserId + }); + } } } else