From a3868c9516382a0fe0f5e665bb44451c814de88e Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 28 Dec 2023 21:01:10 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rule/consume_integral_settlement.go b/rule/consume_integral_settlement.go index c85694a..9e82f4c 100644 --- a/rule/consume_integral_settlement.go +++ b/rule/consume_integral_settlement.go @@ -166,7 +166,7 @@ func calcNowEverydayConsumeIntegral(subsidyBase *model.SubsidyBase, hasConsumeTo if subsidyBase.FloatSubsidyOpen == 0 { //没有浮动补贴情况 subsidyBase.FloatSubsidyBili = 0 } - floatSubsidyBili := decimal.NewFromInt(int64(subsidyBase.FloatSubsidyBili) / 10000) + floatSubsidyBili := decimal.NewFromFloat(float64(subsidyBase.FloatSubsidyBili) / 10000) consumeTotal := decimal.NewFromInt(hasConsumeTotal) value, _ = consumptionMoney.Mul(floatSubsidyBili).Div(consumeTotal).Add(baseSubsidyMoney).Float64() return @@ -180,7 +180,7 @@ func calcNowEverydayExperienceIntegral(subsidyBase *model.SubsidyBase, hasExperi if subsidyBase.FloatSubsidyOpen == 0 { //没有浮动补贴情况 subsidyBase.FloatSubsidyBili = 0 } - floatSubsidyBili := decimal.NewFromInt(int64(subsidyBase.FloatSubsidyBili) / 10000) + floatSubsidyBili := decimal.NewFromFloat(float64(subsidyBase.FloatSubsidyBili) / 10000) consumeTotal := decimal.NewFromInt(hasExperienceTotal) value, _ = experienceMoney.Mul(floatSubsidyBili).Div(consumeTotal).Add(baseSubsidyMoney).Float64() return