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