From 89672a879612cc284310de333ecaf49619a6ba2b Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 22 May 2024 11:56:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/consume_integral_settlement.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rule/consume_integral_settlement.go b/rule/consume_integral_settlement.go index e299f26..ee6eeaa 100644 --- a/rule/consume_integral_settlement.go +++ b/rule/consume_integral_settlement.go @@ -364,8 +364,10 @@ func DealUserConsumeIntegral(session *xorm.Session, subsidyWithUser *model.Subsi balanceAmount := subsidyWithUser.LeaveDay afterAmount := balanceAmount - 1 isEnd := 0 - if afterAmount <= 0 { + if afterAmount < 0 { isEnd = 1 + } + if afterAmount <= 0 { afterAmount = 0 subsidyWithUser.State = 3 //补贴完 } @@ -441,8 +443,10 @@ func DealUserExperienceIntegral(session *xorm.Session, subsidyWithUser *model.Su balanceAmount := subsidyWithUser.LeaveDay afterAmount := balanceAmount - 1 isEnd := 0 - if afterAmount <= 0 { + if afterAmount < 0 { isEnd = 1 + } + if afterAmount <= 0 { afterAmount = 0 subsidyWithUser.State = 3 //补贴完 }