1
This commit is contained in:
parent
9776811b88
commit
a1f460818e
@ -7,6 +7,7 @@ import (
|
|||||||
"main/common"
|
"main/common"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
. "main/global"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -38,6 +39,12 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
|
|||||||
} else if filterType == 2 {
|
} else if filterType == 2 {
|
||||||
sql += "B.status <> '" + constant.ORDER_STATUS_ACTIVE + "'"
|
sql += "B.status <> '" + constant.ORDER_STATUS_ACTIVE + "'"
|
||||||
}
|
}
|
||||||
|
rspObj := struct {
|
||||||
|
ErrCode int32 `json:"errcode"`
|
||||||
|
ErrMsg string `json:"errmsg"`
|
||||||
|
Page common.StreamPagination `json:"page"`
|
||||||
|
Rows []interface{} `json:"rows"`
|
||||||
|
}{}
|
||||||
nfts := []common.NftDto{}
|
nfts := []common.NftDto{}
|
||||||
f5.GetGoStyleDb().StreamPageQuery(
|
f5.GetGoStyleDb().StreamPageQuery(
|
||||||
constant.BCNFT_DB,
|
constant.BCNFT_DB,
|
||||||
@ -51,7 +58,7 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
|
|||||||
),
|
),
|
||||||
"",
|
"",
|
||||||
func (err error, pagination *f5.StreamPagination) {
|
func (err error, pagination *f5.StreamPagination) {
|
||||||
|
rspObj.Page.FillPage(pagination)
|
||||||
},
|
},
|
||||||
func (ds *f5.DataSet) {
|
func (ds *f5.DataSet) {
|
||||||
p := q5.NewSliceElement(&nfts)
|
p := q5.NewSliceElement(&nfts)
|
||||||
@ -59,9 +66,6 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
|
|||||||
p.ContractAddress = ds.GetByName("contract_address")
|
p.ContractAddress = ds.GetByName("contract_address")
|
||||||
p.TokenId = ds.GetByName("token_id")
|
p.TokenId = ds.GetByName("token_id")
|
||||||
})
|
})
|
||||||
rspObj := struct {
|
GetCacheMgr().GetNfts(nfts)
|
||||||
Page *common.StreamPagination `json:"page"`
|
|
||||||
Rows []interface{} `json:"rows"`
|
|
||||||
}{}
|
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
}
|
}
|
||||||
|
5
server/marketserver/cache/cachemgr.go
vendored
5
server/marketserver/cache/cachemgr.go
vendored
@ -2,6 +2,7 @@ package cache
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
"main/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type cacheMgr struct {
|
type cacheMgr struct {
|
||||||
@ -16,6 +17,10 @@ func (this *cacheMgr) UnInit() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *cacheMgr) GetNfts(nfts []common.NftDto) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (this *cacheMgr) internalGetNft(netId int32, contractAddress string, tokenId string) *nft {
|
func (this *cacheMgr) internalGetNft(netId int32, contractAddress string, tokenId string) *nft {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ type TaskMgr interface{
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CacheMgr interface{
|
type CacheMgr interface{
|
||||||
|
GetNfts([]NftDto)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user