调整,质押继续有收益

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,7 +60,8 @@ func (cta *ContriApi) HistoryQuery(c *gin.Context) {
{ {
loweremail, accountid := service.Contribution.GetEmailAccountId(account) loweremail, accountid := service.Contribution.GetEmailAccountId(account)
sql := `SELECT * FROM t_contribution_history WHERE idx > 0 AND account_id = ?` if accountid != "" {
sql = `SELECT * FROM t_contribution_history WHERE idx > 0 AND account_id = ?`
f5.GetGoStyleDb().RawQuery( f5.GetGoStyleDb().RawQuery(
constant.GAME_DB, constant.GAME_DB,
sql, sql,
@ -78,6 +79,7 @@ func (cta *ContriApi) HistoryQuery(c *gin.Context) {
q5.AppendSlice(&rspObj.Rows, p) q5.AppendSlice(&rspObj.Rows, p)
} }
}) })
}
sql = `SELECT * FROM t_recharge_return_contribution WHERE idx > 0 AND user_identity IN (?` sql = `SELECT * FROM t_recharge_return_contribution WHERE idx > 0 AND user_identity IN (?`

View File

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