修改质押查询
This commit is contained in:
parent
cc0fbeede5
commit
153a779d68
@ -3,6 +3,7 @@ package market
|
||||
import (
|
||||
"f5"
|
||||
"fmt"
|
||||
"jccommon"
|
||||
"main/common"
|
||||
"main/constant"
|
||||
. "main/global"
|
||||
@ -42,12 +43,13 @@ func (this *MarketApi) LockList(c *gin.Context) {
|
||||
|
||||
pageSize := q5.AdjustRangeValue(q5.SafeToInt32(reqJson.PageSize), 1, 20)
|
||||
cursor := q5.SafeToInt64(reqJson.Cursor)
|
||||
nftLockMeta := mt.Table.Contract.GetByName(jccommon.CONTRACT_NAME_NFTLock)
|
||||
sql := fmt.Sprintf(`
|
||||
SELECT * FROM t_nft
|
||||
WHERE idx > %d AND net_id = %d AND last_owner_address = ? AND owner_address != ? AND last_owner_address = last_lock_address`,
|
||||
cursor, netId)
|
||||
WHERE idx > %d AND net_id = %d AND owner_address = '%s' AND last_lock_address = ? `,
|
||||
cursor, netId, nftLockMeta.GetAddress())
|
||||
|
||||
params := []string{owner,owner}
|
||||
params := []string{owner}
|
||||
subFilters := []f5.DbQueryFilter{}
|
||||
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ type table struct {
|
||||
Config *ConfigTable
|
||||
Item *ItemTable
|
||||
Language *LanguageTable
|
||||
//Contract *ContractTable
|
||||
Contract *ContractTable
|
||||
Web3ServiceCluster *Web3ServiceClusterTable
|
||||
}
|
||||
|
||||
@ -52,12 +52,10 @@ var Table = f5.New(func(this *table) {
|
||||
this.PrimKey = "info"
|
||||
})
|
||||
|
||||
/*
|
||||
this.Contract = f5.New(func(this *ContractTable) {
|
||||
this.FileName = "../config/contract.json"
|
||||
this.PrimKey = "name"
|
||||
})
|
||||
*/
|
||||
})
|
||||
|
||||
this.Web3ServiceCluster = f5.New(func(this *Web3ServiceClusterTable) {
|
||||
this.FileName = "../config/web3service.cluster.json"
|
||||
|
Loading…
x
Reference in New Issue
Block a user