1
This commit is contained in:
parent
05ca383b82
commit
e63d82fe75
@ -35,4 +35,7 @@ const (
|
|||||||
USER_ADD_GOLD_REASON_USE = 2
|
USER_ADD_GOLD_REASON_USE = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const VESTER_DEPOSIT_EVENT_NAME = "Deposit"
|
||||||
|
const VESTER_WITHDRAW_EVENT_NAME = "Withdraw"
|
||||||
|
|
||||||
const BASE_SCORE = 2800
|
const BASE_SCORE = 2800
|
||||||
|
@ -11,9 +11,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VESTER_DEPOSIT_EVENT_NAME = "Deposit"
|
|
||||||
const VESTER_WITHDRAW_EVENT_NAME = "Withdraw"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Deposit amount his_amount 衰减,最后的存覆盖之前的
|
Deposit amount his_amount 衰减,最后的存覆盖之前的
|
||||||
Withdraw 所有
|
Withdraw 所有
|
||||||
@ -57,8 +54,8 @@ ORDER BY idx LIMIT 1000
|
|||||||
netId)
|
netId)
|
||||||
params := []string{
|
params := []string{
|
||||||
contractAddress,
|
contractAddress,
|
||||||
VESTER_DEPOSIT_EVENT_NAME,
|
constant.VESTER_DEPOSIT_EVENT_NAME,
|
||||||
VESTER_WITHDRAW_EVENT_NAME,
|
constant.VESTER_WITHDRAW_EVENT_NAME,
|
||||||
}
|
}
|
||||||
return sql, params
|
return sql, params
|
||||||
},
|
},
|
||||||
@ -116,7 +113,7 @@ func (this* vester) saveToDb(ds *f5.DataSet) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
decodeJsonOk := false
|
decodeJsonOk := false
|
||||||
if eventName == VESTER_DEPOSIT_EVENT_NAME {
|
if eventName == constant.VESTER_DEPOSIT_EVENT_NAME {
|
||||||
p := new(jccommon.VesterDepositPo)
|
p := new(jccommon.VesterDepositPo)
|
||||||
if q5.DecodeJson(returnValues, p) == nil {
|
if q5.DecodeJson(returnValues, p) == nil {
|
||||||
decodeJsonOk = true
|
decodeJsonOk = true
|
||||||
@ -134,7 +131,7 @@ func (this* vester) saveToDb(ds *f5.DataSet) bool {
|
|||||||
}
|
}
|
||||||
return service.Vip.RecalcEsCecConvert(p.Account) == nil
|
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)
|
p := new(jccommon.VesterWithdrawPo)
|
||||||
if q5.DecodeJson(returnValues, p) == nil {
|
if q5.DecodeJson(returnValues, p) == nil {
|
||||||
decodeJsonOk = true
|
decodeJsonOk = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user