1
This commit is contained in:
parent
b2f1cf3ca1
commit
6901ba76c3
@ -263,13 +263,27 @@ func (this* repairNft) updateSale(netId int32, contractAddress string, tokenId s
|
||||
|
||||
func (this* repairNft) repairChainActivity(ds *f5.DataSet) bool {
|
||||
netId := q5.ToInt32(ds.GetByName("net_id"))
|
||||
contractAddress := ds.GetByName("contract_address")
|
||||
nftContractAddress := ds.GetByName("nft_contract_address")
|
||||
tokenId := ds.GetByName("token_id")
|
||||
|
||||
var itemId int32
|
||||
var quality int32
|
||||
if service.GetHeroByTokenId(tokenId, &itemId, &quality) {
|
||||
this.updateSale(netId, contractAddress, tokenId, itemId, quality)
|
||||
service.GetNftItemIdQuality(netId, nftContractAddress, tokenId, &itemId, &quality)
|
||||
if itemId > 0 || quality > 0 {
|
||||
f5.GetGoStyleDb().Update(
|
||||
constant.BCEVENT_DB,
|
||||
"t_chain_activity",
|
||||
[][]string {
|
||||
{"net_id", q5.ToString(netId)},
|
||||
{"nft_contract_address", nftContractAddress},
|
||||
{"token_id", tokenId},
|
||||
},
|
||||
[][]string {
|
||||
{"item_id", q5.ToString(itemId)},
|
||||
{"quality", q5.ToString(quality)},
|
||||
},
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
})
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user