1
This commit is contained in:
parent
f583dda29b
commit
e1bdaf25f0
@ -1,11 +1,9 @@
|
|||||||
package task
|
package task
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"q5"
|
|
||||||
"f5"
|
"f5"
|
||||||
"time"
|
"time"
|
||||||
"fmt"
|
"fmt"
|
||||||
"jccommon"
|
|
||||||
"main/constant"
|
"main/constant"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -27,7 +25,7 @@ func (this* repairNft) processNft() {
|
|||||||
constant.BCNFT_DB,
|
constant.BCNFT_DB,
|
||||||
func (lastIdx int64) string {
|
func (lastIdx int64) string {
|
||||||
sql := fmt.Sprintf(`
|
sql := fmt.Sprintf(`
|
||||||
SELECT * FROM nft WHERE idx > %d AND item_id = 0 LIMIT 1000`,
|
SELECT * FROM t_nft WHERE idx > %d AND item_id = 0 LIMIT 1000`,
|
||||||
lastIdx,
|
lastIdx,
|
||||||
)
|
)
|
||||||
return sql
|
return sql
|
||||||
@ -90,40 +88,3 @@ SELECT * FROM nft WHERE idx > %d AND item_id = 0 LIMIT 1000`,
|
|||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this* repairNft) getItemIdHeroQuality(netId int32, contractAddress string, tokenId string,
|
|
||||||
itemId *int32, heroQuality *int32) {
|
|
||||||
f5.GetGoStyleDb().OrmSelectOne(
|
|
||||||
constant.BCNFT_DB,
|
|
||||||
"t_nft",
|
|
||||||
[][]string {
|
|
||||||
{"net_id", q5.ToString(netId)},
|
|
||||||
{"contract_address", contractAddress},
|
|
||||||
{"token_id", tokenId},
|
|
||||||
},
|
|
||||||
func (err error, ds *f5.DataSet) {
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ds.Next() {
|
|
||||||
*itemId = q5.ToInt32(ds.GetByName("item_id"))
|
|
||||||
tokenType := q5.ToInt32(ds.GetByName("token_type"))
|
|
||||||
if tokenType == jccommon.NFT_TYPE_CFHERO {
|
|
||||||
f5.GetGoStyleDb().OrmSelectOne(
|
|
||||||
constant.GAME_DB,
|
|
||||||
"t_hero",
|
|
||||||
[][]string {
|
|
||||||
{"token_id", tokenId},
|
|
||||||
},
|
|
||||||
func (err error, ds *f5.DataSet) {
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ds.Next() {
|
|
||||||
*heroQuality = q5.ToInt32(ds.GetByName("quality"))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
2
third_party/f5
vendored
2
third_party/f5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 04c7b77bd79f7ce2dd706bc0ee3deb18d7bc7fd9
|
Subproject commit bf49efd5a029a9e0749019c03fb4295dd89bf350
|
Loading…
x
Reference in New Issue
Block a user