This commit is contained in:
aozhiwei 2024-06-25 16:01:52 +08:00
parent 9b78e7f8fd
commit 3c66829b78
4 changed files with 39 additions and 1 deletions

View File

@ -5,4 +5,6 @@ type App interface {
}
type TaskMgr interface {
LockOpenGodBullion()
UnLockOpenGodBullion()
}

View File

@ -1,5 +1,6 @@
package service
func SendSysMail(uniKey string, to string, subject string, content string, expireTime int32, tag1 int32, tag2 int32) bool {
func SendSysMail(uniKey string, to string, subject string, content string, expireTime int32,
tag1 int32, tag2 int32) bool {
return true
}

View File

@ -1,5 +1,30 @@
package service
import (
"q5"
"f5"
"main/constant"
)
func UpdateSpecTransferStatus(dbIdx int64, status int32) bool {
return true
}
func OpenGoldBullion(accountId string, netId int32, tokenId string, goldNum int32) bool {
result := false
f5.GetGoStyleDb().OrmSelectOne(
constant.GAME_DB,
"t_gold_bullion",
[][]string {
{"net_id", q5.ToString(netId)},
{"token_id", tokenId},
},
func (err error, ds *f5.DataSet) {
if err != nil {
return
}
if ds.Next() {
}
})
return result
}

View File

@ -2,6 +2,7 @@ package task
import (
//"fmt"
"sync"
"main/task/spec_transfer721"
)
@ -12,6 +13,7 @@ type taskMgr struct {
goldBullionReturn
spec_transfer721.SpecTransfer721
repairNft
openGoldLock sync.Mutex
}
func (this *taskMgr) Init() {
@ -29,3 +31,11 @@ func (this *taskMgr) UnInit() {
this.goldBullionReturn.unInit()
this.webHook.unInit()
}
func (this *taskMgr) LockOpenGodBullion() {
this.openGoldLock.Lock()
}
func (this *taskMgr) UnLockOpenGodBullion() {
this.openGoldLock.Unlock()
}