game2006go/server/light_backtask/task/chain_activity.go
aozhiwei 03e0047b60 1
2024-07-23 14:03:05 +08:00

57 lines
1.0 KiB
Go

package task
import (
"f5"
"main/constant"
"jccommon"
"fmt"
)
type chainActivity struct {
}
type lockReturnValues struct {
Nft string `json:"nft"`
Sender string `json:"sender"`
To string `json:"to"`
TokenIds []string `json:"tokenIds"`
}
type unLockReturnValues struct {
Nft string `json:"nft"`
User string `json:"user"`
NftList []interface{} `json:"nftList"`
}
func (this* chainActivity) init() {
go this.process()
}
func (this* chainActivity) unInit() {
}
func (this* chainActivity) process() {
f5.GetGoStyleDb().IncrementLoad(
constant.BCNFT_DB,
"chainActivity",
"t_blockchain_event",
func (lastIdx int64, maxIdx int64) (string, []string) {
sql := fmt.Sprintf(`
SELECT * FROM t_blockchain_event
WHERE idx > %d AND idx <= %d AND item_id = 0 AND token_type <> %d ORDER BY idx LIMIT 1000
`,
lastIdx,
maxIdx,
jccommon.NFT_TYPE_FOUNDER_TAG,
)
params := []string{}
return sql, params
},
this.repairNft)
}
func (this* chainActivity) repairNft(ds *f5.DataSet) bool {
return true
}