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 != "" {