From e4178b09bcb46ea5b3904da1544fd7c25ee67a54 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 11 Dec 2024 20:23:38 +0800 Subject: [PATCH] update --- app/hdl/hdl_member_center.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/hdl/hdl_member_center.go b/app/hdl/hdl_member_center.go index 8788658..c6df992 100644 --- a/app/hdl/hdl_member_center.go +++ b/app/hdl/hdl_member_center.go @@ -157,6 +157,12 @@ func MemberCenterGetBasic(c *gin.Context) { ratio := decimal.NewFromInt(1).Div(nowPrice).StringFixed(16) ratioStr := fmt.Sprintf("%s:1", ratio) + contributionValueDecimal, err := decimal.NewFromString(contributionValue.Amount) + if err != nil { + e.OutErr(c, e.ERR_UNMARSHAL, nil) + return + } + resp := md.MemberCenterGetBasicResp{ Nickname: user.Nickname, LevelName: level.LevelName, @@ -164,7 +170,7 @@ func MemberCenterGetBasic(c *gin.Context) { EggScore: utils.Float64ToStr(score), EggEnergy: utils.Float64ToStr(eggEnergy), EggEnergyValue: eggEnergyValue.String(), - ContributionValue: contributionValue.Amount, + ContributionValue: contributionValueDecimal.StringFixed(0), Date: "25", Ratio: ratioStr, Amount: wallet.Amount,