调整,质押继续有收益

This commit is contained in:
yangduo 2024-08-23 14:33:42 +08:00
parent e0c06c8b01
commit c8187f971e
2 changed files with 24 additions and 20 deletions

View File

@ -60,24 +60,26 @@ func (cta *ContriApi) HistoryQuery(c *gin.Context) {
{
loweremail, accountid := service.Contribution.GetEmailAccountId(account)
sql := `SELECT * FROM t_contribution_history WHERE idx > 0 AND account_id = ?`
f5.GetGoStyleDb().RawQuery(
constant.GAME_DB,
sql,
[]string{accountid},
func(err error, ds *f5.DataSet) {
if err != nil {
return
}
if accountid != "" {
sql = `SELECT * FROM t_contribution_history WHERE idx > 0 AND account_id = ?`
f5.GetGoStyleDb().RawQuery(
constant.GAME_DB,
sql,
[]string{accountid},
func(err error, ds *f5.DataSet) {
if err != nil {
return
}
for ds.Next() {
p := new(info)
p.Type = 2
p.Time = q5.SafeToInt32(ds.GetByName("createtime"))
p.CP = fmt.Sprintf("%.2f", q5.ToFloat64(ds.GetByName("contribution")))
q5.AppendSlice(&rspObj.Rows, p)
}
})
for ds.Next() {
p := new(info)
p.Type = 2
p.Time = q5.SafeToInt32(ds.GetByName("createtime"))
p.CP = fmt.Sprintf("%.2f", q5.ToFloat64(ds.GetByName("contribution")))
q5.AppendSlice(&rspObj.Rows, p)
}
})
}
sql = `SELECT * FROM t_recharge_return_contribution WHERE idx > 0 AND user_identity IN (?`

View File

@ -10,7 +10,7 @@ import (
type accountContribution struct {
history float64
loadhistory bool
// loadhistory bool
gamecontribution float64
rechargeContri float64
gcTime int64
@ -149,7 +149,9 @@ func (this *contribution) GetAddressContribution(accountAddress string, onlyrech
}
}
if !(*accinfo).loadhistory {
// if !(*accinfo).loadhistory
{
(*accinfo).history = 0
sql := `SELECT contribution FROM t_contribution WHERE idx > 0 and account_address = ?`
f5.GetGoStyleDb().RawQuery(
constant.BCNFT_DB,
@ -181,7 +183,7 @@ func (this *contribution) GetAddressContribution(accountAddress string, onlyrech
}
})
(*accinfo).loadhistory = true
// (*accinfo).loadhistory = true
}
if (*accinfo).accountid != "" {