This commit is contained in:
aozhiwei 2024-07-16 13:23:36 +08:00
parent 19c1f4f08b
commit 103ac706ff

View File

@ -18,7 +18,7 @@ type AssetApi struct {
}
/*
filterType: 0:全部 1:已上架 2:未上架
filterType: 0:全部 1:已上架 2:未上架 3:质押中
*/
func (this *AssetApi) AccountAsset(c *gin.Context) {
pageSize := q5.AdjustRangeValue(q5.ToInt32(c.DefaultQuery("page_size", "")), 1, 20)
@ -37,6 +37,15 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? `,
sql += " AND B.status = '" + jccommon.ORDER_STATUS_ACTIVE + "' "
} else if filterType == 2 {
sql += " AND (B.status IS NULL OR B.status <> '" + jccommon.ORDER_STATUS_ACTIVE + "') "
} else if filterType == 3 {
lockMeta := mt.Table.Contract.GetByName(jccommon.CONTRACT_NAME_NFTLock)
if lockMeta != nil {
sql += " AND A.last_lock_address = ? "
params = []string{strings.ToLower(lockMeta.GetAddress()),
accountAddress}
} else {
sql += " AND 1 <> 1 "
}
}
subFilters := []f5.DbQueryFilter{}
{