From 4d2fc95ed08a1797d9fec6d439d39c25f028844c Mon Sep 17 00:00:00 2001 From: yangduo Date: Fri, 23 Aug 2024 15:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/marketserver/service/contribution.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/server/marketserver/service/contribution.go b/server/marketserver/service/contribution.go index 8f6bd1a3..7c2b6913 100644 --- a/server/marketserver/service/contribution.go +++ b/server/marketserver/service/contribution.go @@ -10,7 +10,7 @@ import ( type accountContribution struct { history float64 - // loadhistory bool + stakingContri float64 gamecontribution float64 rechargeContri float64 gcTime int64 @@ -19,7 +19,7 @@ type accountContribution struct { } func (ac *accountContribution) sum() float64 { - return ac.history + ac.gamecontribution + ac.rechargeContri + return ac.history + ac.stakingContri + ac.gamecontribution + ac.rechargeContri } type contribution struct { @@ -149,9 +149,7 @@ func (this *contribution) GetAddressContribution(accountAddress string, onlyrech } } - // if !(*accinfo).loadhistory { - (*accinfo).history = 0 sql := `SELECT contribution FROM t_contribution WHERE idx > 0 and account_address = ?` f5.GetGoStyleDb().RawQuery( constant.BCNFT_DB, @@ -178,12 +176,9 @@ func (this *contribution) GetAddressContribution(accountAddress string, onlyrech } if ds.Next() { - tmp, _ := q5.ToFloat64Ex(ds.GetByIndex(0)) - (*accinfo).history += tmp + (*accinfo).stakingContri, _ = q5.ToFloat64Ex(ds.GetByIndex(0)) } }) - - // (*accinfo).loadhistory = true } if (*accinfo).accountid != "" {