调整
This commit is contained in:
parent
c8187f971e
commit
4d2fc95ed0
@ -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 != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user