1
This commit is contained in:
parent
a1f460818e
commit
9b3c2d3b07
@ -45,7 +45,7 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
|
|||||||
Page common.StreamPagination `json:"page"`
|
Page common.StreamPagination `json:"page"`
|
||||||
Rows []interface{} `json:"rows"`
|
Rows []interface{} `json:"rows"`
|
||||||
}{}
|
}{}
|
||||||
nfts := []common.NftDto{}
|
nfts := []*common.NftDto{}
|
||||||
f5.GetGoStyleDb().StreamPageQuery(
|
f5.GetGoStyleDb().StreamPageQuery(
|
||||||
constant.BCNFT_DB,
|
constant.BCNFT_DB,
|
||||||
pageSize,
|
pageSize,
|
||||||
@ -61,10 +61,11 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
|
|||||||
rspObj.Page.FillPage(pagination)
|
rspObj.Page.FillPage(pagination)
|
||||||
},
|
},
|
||||||
func (ds *f5.DataSet) {
|
func (ds *f5.DataSet) {
|
||||||
p := q5.NewSliceElement(&nfts)
|
p := new(common.NftDto)
|
||||||
p.NetId = q5.ToInt32(ds.GetByName("net_id"))
|
p.NetId = q5.ToInt32(ds.GetByName("net_id"))
|
||||||
p.ContractAddress = ds.GetByName("contract_address")
|
p.ContractAddress = ds.GetByName("contract_address")
|
||||||
p.TokenId = ds.GetByName("token_id")
|
p.TokenId = ds.GetByName("token_id")
|
||||||
|
q5.AppendSlice(&nfts, p)
|
||||||
})
|
})
|
||||||
GetCacheMgr().GetNfts(nfts)
|
GetCacheMgr().GetNfts(nfts)
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
|
5
server/marketserver/cache/cachemgr.go
vendored
5
server/marketserver/cache/cachemgr.go
vendored
@ -17,8 +17,11 @@ func (this *cacheMgr) UnInit() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *cacheMgr) GetNfts(nfts []common.NftDto) {
|
func (this *cacheMgr) GetNfts(nfts []*common.NftDto) {
|
||||||
|
/*
|
||||||
|
for _, val := range nfts {
|
||||||
|
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *cacheMgr) internalGetNft(netId int32, contractAddress string, tokenId string) *nft {
|
func (this *cacheMgr) internalGetNft(netId int32, contractAddress string, tokenId string) *nft {
|
||||||
|
@ -64,7 +64,7 @@ type TaskMgr interface{
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CacheMgr interface{
|
type CacheMgr interface{
|
||||||
GetNfts([]NftDto)
|
GetNfts([]*NftDto)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user