service: use created_at field to sort the orders

Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
c9s 2022-06-23 01:35:16 +08:00
parent 2c96d079b8
commit 8c1198de83
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -94,7 +94,7 @@ func SelectLastOrders(ex types.ExchangeName, symbol string, isMargin, isFutures,
sq.Eq{"is_futures": isFutures}, sq.Eq{"is_futures": isFutures},
sq.Eq{"is_isolated": isIsolated}, sq.Eq{"is_isolated": isIsolated},
}). }).
OrderBy("gid DESC"). OrderBy("created_at DESC").
Limit(limit) Limit(limit)
} }