This commit is contained in:
aozhiwei 2024-06-16 10:43:38 +08:00
parent 83eaf03d75
commit a7c073ada9
2 changed files with 8 additions and 2 deletions

View File

@ -32,8 +32,8 @@ func (this *AssetApi) AccountAsset(c *gin.Context) {
sql := fmt.Sprintf(`
SELECT A.idx, A.net_id, A.token_type, A.token_id, A.contract_address, B.status FROM t_nft A LEFT JOIN t_order B
ON A.net_id = B.net_id AND A.contract_address = B.contract_address AND A.token_id = B.token_id
WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`,
cursor, netId, pageSize + 1)
WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? `,
cursor, netId)
if filterType == 1 {
sql += "B.status = '" + constant.ORDER_STATUS_ACTIVE + "'"
} else if filterType == 2 {

View File

@ -57,6 +57,12 @@ func (this *MarketApi) ProductList(c *gin.Context) {
SELECT * FROM t_order A WHERE idx > %d AND net_id = %d AND status="%s"
`,
cursor, netId, constant.ORDER_STATUS_ACTIVE)
if f5.IsTestEnv() {
sql = fmt.Sprintf(`
SELECT * FROM t_order A WHERE idx > %d AND net_id = %d
`,
cursor, netId)
}
orderBy := ""
{