From a1dc6bee92afff85e57194b11e46374fa9b159b8 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Mon, 9 Dec 2024 10:57:50 +0800 Subject: [PATCH] update --- app/hdl/hdl_member_center.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/hdl/hdl_member_center.go b/app/hdl/hdl_member_center.go index d305541..e93947d 100644 --- a/app/hdl/hdl_member_center.go +++ b/app/hdl/hdl_member_center.go @@ -12,6 +12,7 @@ import ( es2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils/es" "code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es" "encoding/json" + "fmt" "github.com/gin-gonic/gin" "github.com/olivere/elastic/v7" "github.com/shopspring/decimal" @@ -153,6 +154,8 @@ func MemberCenterGetBasic(c *gin.Context) { //} score = doc.ScoreValue } + ratio := decimal.NewFromInt(1).Div(nowPrice).StringFixed(0) + ratioStr := fmt.Sprintf("%s:1", ratio) resp := md.MemberCenterGetBasicResp{ Nickname: user.Nickname, @@ -162,8 +165,8 @@ func MemberCenterGetBasic(c *gin.Context) { EggEnergy: utils.Float64ToStr(eggEnergy), EggEnergyValue: eggEnergyValue.String(), ContributionValue: contributionValue.Amount, - Date: "29", - Ratio: "1:1000", + Date: "25", + Ratio: ratioStr, Amount: wallet.Amount, Id: utils.Int64ToStr(user.Id), Phone: user.Phone,