From 16f75d222c2d43ccec9bf1567461f6a11b0b0085 Mon Sep 17 00:00:00 2001 From: lianghuanjie Date: Mon, 13 Jan 2025 14:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E6=8A=BC=E5=A5=96=E5=8A=B1=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/task/get_stake_task_detail_logic.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/logic/task/get_stake_task_detail_logic.go b/internal/logic/task/get_stake_task_detail_logic.go index b892568..65c48fd 100644 --- a/internal/logic/task/get_stake_task_detail_logic.go +++ b/internal/logic/task/get_stake_task_detail_logic.go @@ -4,6 +4,7 @@ import ( "context" "errors" "github.com/spf13/cast" + "math" "nova_task/internal/model" "nova_task/internal/pkg/errs" "nova_task/internal/pkg/utils" @@ -95,9 +96,9 @@ func (l *GetStakeTaskDetailLogic) GetStakeTaskDetail() (*types.StakeTaskDetail, StartDate: start.Format(time.DateOnly), EndDate: end.Format(time.DateOnly), CountDown: utils.TodayRemainSeconds(), - ProduceTokensToday: produceTokensToday, + ProduceTokensToday: math.Round(produceTokensToday*100) / 100, GameBonus: gameBonus, - CanReceiveTokens: canReceiveTokens, - TotalIncomeTokens: totalIncomeReward, + CanReceiveTokens: math.Round(canReceiveTokens*100) / 100, + TotalIncomeTokens: math.Round(totalIncomeReward*100) / 100, }, nil }