1
This commit is contained in:
parent
6823662718
commit
4ee6513d2b
@ -1,6 +1,7 @@
|
||||
package jccommon
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
@ -84,3 +85,7 @@ func CalcContributionScore(nfts []*NftStacking) float64 {
|
||||
score = baseScore * (1 + rate)
|
||||
return score
|
||||
}
|
||||
|
||||
func Test() {
|
||||
f5.GetApp().GetRealMills()
|
||||
}
|
||||
|
@ -1,14 +1,63 @@
|
||||
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().LoopLoad(
|
||||
constant.BCNFT_DB,
|
||||
"chainActivity",
|
||||
"t_blockchain_event",
|
||||
func () int64 {
|
||||
return 60 * 1
|
||||
},
|
||||
func (lastIdx int64) string {
|
||||
sql := fmt.Sprintf(`
|
||||
SELECT * FROM t_blockchain_event WHERE idx > %d AND item_id = 0 AND token_type <> %d ORDER BY idx LIMIT 1000`,
|
||||
lastIdx,
|
||||
jccommon.NFT_TYPE_FOUNDER_TAG,
|
||||
)
|
||||
return sql
|
||||
},
|
||||
[]string{
|
||||
},
|
||||
func () int64 {
|
||||
return 10
|
||||
},
|
||||
func () int64 {
|
||||
return 60 * 5
|
||||
},
|
||||
this.repairNft)
|
||||
}
|
||||
|
||||
func (this* chainActivity) repairNft(ds *f5.DataSet) bool {
|
||||
return true
|
||||
}
|
||||
|
@ -19,13 +19,13 @@ func (this *taskMgr) Init() {
|
||||
this.sysMail.init()
|
||||
this.repairOrder.init()
|
||||
//this.refreshMeta.init()
|
||||
//this.contribution.init()
|
||||
this.contribution.init()
|
||||
this.chainActivity.init()
|
||||
}
|
||||
|
||||
func (this *taskMgr) UnInit() {
|
||||
this.chainActivity.unInit()
|
||||
//this.contribution.unInit()
|
||||
this.contribution.unInit()
|
||||
//this.refreshMeta.unInit()
|
||||
this.repairOrder.unInit()
|
||||
this.sysMail.unInit()
|
||||
|
2
third_party/q5
vendored
2
third_party/q5
vendored
@ -1 +1 @@
|
||||
Subproject commit db5e6157047ccd3782d5b00013fe0ee660feddb0
|
||||
Subproject commit ccfa6c4f99237a18799b65f9d19686be8342bbe0
|
Loading…
x
Reference in New Issue
Block a user