This commit is contained in:
aozhiwei 2024-06-15 15:43:41 +08:00
parent a1f460818e
commit 9b3c2d3b07
3 changed files with 8 additions and 4 deletions

View File

@ -45,7 +45,7 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
Page common.StreamPagination `json:"page"`
Rows []interface{} `json:"rows"`
}{}
nfts := []common.NftDto{}
nfts := []*common.NftDto{}
f5.GetGoStyleDb().StreamPageQuery(
constant.BCNFT_DB,
pageSize,
@ -61,10 +61,11 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
rspObj.Page.FillPage(pagination)
},
func (ds *f5.DataSet) {
p := q5.NewSliceElement(&nfts)
p := new(common.NftDto)
p.NetId = q5.ToInt32(ds.GetByName("net_id"))
p.ContractAddress = ds.GetByName("contract_address")
p.TokenId = ds.GetByName("token_id")
q5.AppendSlice(&nfts, p)
})
GetCacheMgr().GetNfts(nfts)
c.JSON(200, rspObj)

View File

@ -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 {

View File

@ -64,7 +64,7 @@ type TaskMgr interface{
}
type CacheMgr interface{
GetNfts([]NftDto)
GetNfts([]*NftDto)
}