fix: preserve order dispatch mode

This commit is contained in:
richjohnrambo
2026-10-13 15:45:55 +08:00
parent 45ef10b2af
commit b3bf41af8b
3 changed files with 9 additions and 2 deletions
+3 -1
View File
@@ -341,7 +341,9 @@ func (s *Store) AutoMatchTaskOrder(ctx context.Context, tenantID, memberID, orde
}
}
}
if order.AutoDispatch != 1 || time.Now().UTC().Before(matchAt) {
dispatchMode, _ := snapshot["dispatch_mode"].(string)
isAutoDispatch := dispatchMode == "auto" || dispatchMode == "" && order.AutoDispatch == 1
if !isAutoDispatch || time.Now().UTC().Before(matchAt) {
return tx.Commit()
}