fix(lastleg): return persisted grouped dispatch replay facts
This commit is contained in:
+6
-1
@@ -556,7 +556,12 @@ public class DispatchService {
|
||||
drafts.updateById(draft);
|
||||
}
|
||||
}
|
||||
return response(dispatch, items.findByDispatchOrder(customerId, dispatch.getId()));
|
||||
// Exact grouped replay must return the same persisted timestamp precision
|
||||
// on the initial call as on later reads from DATETIME(3).
|
||||
DispatchOrder responseOrder = preserveExactReplay
|
||||
? Objects.requireNonNull(orders.lockById(customerId, dispatch.getId()), "Saved dispatch is missing")
|
||||
: dispatch;
|
||||
return response(responseOrder, items.findByDispatchOrder(customerId, dispatch.getId()));
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
||||
Reference in New Issue
Block a user