This commit is contained in:
aozhiwei 2024-06-23 13:29:04 +08:00
parent 48e8bbefd9
commit 15752e0317
4 changed files with 19 additions and 18 deletions

View File

@ -6,10 +6,3 @@ type App interface {
type TaskMgr interface {
}
type SpecTransfer721Handle interface {
OnMint(dbIdx int64, netId int32, contractAddress string, tokenId string,
from string, to string) bool
OnLock() bool
OnUnlock() bool
}

View File

@ -1,4 +1,4 @@
package task
package spec_transfer721
import (
"q5"
@ -8,24 +8,23 @@ import (
//"mt"
//"jccommon"
"main/constant"
"main/common"
)
type specTransfer721 struct {
handleHash *q5.ConcurrentMap[string, common.SpecTransfer721Handle]
type SpecTransfer721 struct {
handleHash *q5.ConcurrentMap[string, specTransfer721Handle]
}
func (this* specTransfer721) init() {
this.handleHash = new(q5.ConcurrentMap[string, common.SpecTransfer721Handle])
func (this* SpecTransfer721) Init() {
this.handleHash = new(q5.ConcurrentMap[string, specTransfer721Handle])
//this.handleHash.Store(jccommon.CONTRACT_NAME_CFHero, this.procHero)
//this.handleHash.Store(jccommon.CONTRACT_NAME_GoldBrick, this.procGoldBullion)
go this.process()
}
func (this* specTransfer721) unInit() {
func (this* SpecTransfer721) UnInit() {
}
func (this* specTransfer721) process() {
func (this* SpecTransfer721) process() {
f5.GetGoStyleDb().LoopLoad(
constant.BCEVENT_DB,
func (lastIdx int64) string {

View File

@ -0,0 +1,8 @@
package spec_transfer721
type specTransfer721Handle interface {
onMint(dbIdx int64, netId int32, contractAddress string, tokenId string,
from string, to string) bool
onLock() bool
onUnlock() bool
}

View File

@ -2,6 +2,7 @@ package task
import (
//"fmt"
"main/task/spec_transfer721"
)
type taskMgr struct {
@ -9,7 +10,7 @@ type taskMgr struct {
//DailyTaskMgr
webHook
goldBullionReturn
specTransfer721
spec_transfer721.SpecTransfer721
repairNft
}
@ -18,13 +19,13 @@ func (this *taskMgr) Init() {
//t.DailyTaskMgr.Init()
this.webHook.init()
this.goldBullionReturn.init()
this.specTransfer721.init()
this.SpecTransfer721.Init()
this.repairNft.init()
}
func (this *taskMgr) UnInit() {
this.repairNft.unInit()
this.specTransfer721.unInit()
this.SpecTransfer721.UnInit()
this.goldBullionReturn.unInit()
this.webHook.unInit()
}