This commit is contained in:
aozhiwei 2024-09-23 17:47:12 +08:00
parent 05ca383b82
commit e63d82fe75
2 changed files with 7 additions and 7 deletions

View File

@ -35,4 +35,7 @@ const (
USER_ADD_GOLD_REASON_USE = 2
)
const VESTER_DEPOSIT_EVENT_NAME = "Deposit"
const VESTER_WITHDRAW_EVENT_NAME = "Withdraw"
const BASE_SCORE = 2800

View File

@ -11,9 +11,6 @@ import (
"strings"
)
const VESTER_DEPOSIT_EVENT_NAME = "Deposit"
const VESTER_WITHDRAW_EVENT_NAME = "Withdraw"
/*
Deposit amount his_amount 衰减,最后的存覆盖之前的
Withdraw 所有
@ -57,8 +54,8 @@ ORDER BY idx LIMIT 1000
netId)
params := []string{
contractAddress,
VESTER_DEPOSIT_EVENT_NAME,
VESTER_WITHDRAW_EVENT_NAME,
constant.VESTER_DEPOSIT_EVENT_NAME,
constant.VESTER_WITHDRAW_EVENT_NAME,
}
return sql, params
},
@ -116,7 +113,7 @@ func (this* vester) saveToDb(ds *f5.DataSet) bool {
}
decodeJsonOk := false
if eventName == VESTER_DEPOSIT_EVENT_NAME {
if eventName == constant.VESTER_DEPOSIT_EVENT_NAME {
p := new(jccommon.VesterDepositPo)
if q5.DecodeJson(returnValues, p) == nil {
decodeJsonOk = true
@ -134,7 +131,7 @@ func (this* vester) saveToDb(ds *f5.DataSet) bool {
}
return service.Vip.RecalcEsCecConvert(p.Account) == nil
}
} else if eventName == VESTER_WITHDRAW_EVENT_NAME {
} else if eventName == constant.VESTER_WITHDRAW_EVENT_NAME {
p := new(jccommon.VesterWithdrawPo)
if q5.DecodeJson(returnValues, p) == nil {
decodeJsonOk = true