From e63d82fe75aaa284f748fed8eb3fc1fe01e69cc3 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 23 Sep 2024 17:47:12 +0800 Subject: [PATCH] 1 --- server/light_backtask/constant/constant.go | 3 +++ server/light_backtask/task/vester.go | 11 ++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/light_backtask/constant/constant.go b/server/light_backtask/constant/constant.go index 3e4febee..4560820a 100644 --- a/server/light_backtask/constant/constant.go +++ b/server/light_backtask/constant/constant.go @@ -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 diff --git a/server/light_backtask/task/vester.go b/server/light_backtask/task/vester.go index 57ca1c1f..0afc3a68 100644 --- a/server/light_backtask/task/vester.go +++ b/server/light_backtask/task/vester.go @@ -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