1
This commit is contained in:
parent
f082131188
commit
bd48b17d92
@ -220,4 +220,37 @@ func (this* webHook) activitySaleCb(ds *f5.DataSet) bool {
|
||||
|
||||
func (this* webHook) 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"))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user