From d4ac76ad82f4b6a2aba2b1449fbac158d984bb7c Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 9 Oct 2024 10:05:00 +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 78d7f4b..41d8306 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 {