1
This commit is contained in:
parent
4e9f35300c
commit
7ee0e131a0
7
server/marketserver/cache/cachemgr.go
vendored
7
server/marketserver/cache/cachemgr.go
vendored
@ -65,11 +65,9 @@ func (this *cacheMgr) internalGetNft(dto *common.NftDto) {
|
||||
},
|
||||
func (rsp f5.HttpCliResponse) {
|
||||
if rsp.GetErr() == nil {
|
||||
p := new(nft)
|
||||
jsonRsp := map[string]interface{}{}
|
||||
q5.DecodeJson(rsp.GetRawData(), &jsonRsp)
|
||||
p.jsonData = jsonRsp
|
||||
dto.NftCache = p
|
||||
dto.NftCache = this.addNft(dto.NetId, dto.ContractAddress, dto.TokenId, jsonRsp)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -146,7 +144,7 @@ func (this *cacheMgr) batchGetNfts(nfts []*common.NftDto) {
|
||||
}
|
||||
|
||||
func (this *cacheMgr) addNft(netId int32, contractAddress string, tokenId string,
|
||||
data map[string]interface{}) {
|
||||
data map[string]interface{}) *nft {
|
||||
dto := new(common.NftDto)
|
||||
dto.NetId = netId
|
||||
dto.ContractAddress = contractAddress
|
||||
@ -154,4 +152,5 @@ func (this *cacheMgr) addNft(netId int32, contractAddress string, tokenId string
|
||||
p := newNft()
|
||||
p.jsonData = data
|
||||
this.nftHash.Store(dto.GetKey(), p)
|
||||
return p
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user