grid2: add one more check for profitStats.InitialOrderID

This commit is contained in:
c9s 2023-04-26 22:06:53 +08:00
parent 8c53346020
commit 55c84e005b
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -51,7 +51,7 @@ func (f *ProfitFixer) Fix(ctx context.Context, since, until time.Time, initialOr
continue
}
if profitStats.InitialOrderID == 0 {
if profitStats.InitialOrderID == 0 || order.OrderID < profitStats.InitialOrderID {
profitStats.InitialOrderID = order.OrderID
}