From 118e32002842d0fc60112f921c68ed1c1dd51045 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 9 Oct 2024 10:05:08 +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 --- app/utils/convert.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/utils/convert.go b/app/utils/convert.go index 362571c..d7142de 100644 --- a/app/utils/convert.go +++ b/app/utils/convert.go @@ -271,6 +271,7 @@ func ByteToFloat64(bytes []byte) float64 { } func Float64ToStr(f float64) string { + f = float64(int(f*100)) / 100 return strconv.FormatFloat(f, 'f', 2, 64) } func Float64ToStrPrec1(f float64) string {