From 4d6382bc7c9d90f9cefc69afc86be323066c955b Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 23 Nov 2023 18:17:50 +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/appreciation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rule/appreciation.go b/rule/appreciation.go index 06db8c3..c6526d7 100644 --- a/rule/appreciation.go +++ b/rule/appreciation.go @@ -37,7 +37,7 @@ func CalcAppreciationValue(session *xorm.Session) (err error, value float64) { } sum, _ := decimal.NewFromString(appreciationBase.Sum) //总资产 flowSum, _ := decimal.NewFromString(appreciationBase.FlowSum) //流通资产 - value, _ = sum.Div(flowSum).Float64() + value, _ = sum.Div(flowSum).RoundFloor(4).Float64() return } @@ -49,7 +49,7 @@ func DealTransferIn(session *xorm.Session, amount float64) (err error, value flo return } nowValueF := decimal.NewFromFloat(nowValue) - value, _ = amountValue.Div(nowValueF).RoundFloor(4).Float64() + value, _ = amountValue.Div(nowValueF).Float64() return }