feat(98-order-imported-first-only): gate order.imported na pierwszy import + backfill statusow

- AllegroOrderImportService / ShopproOrdersSyncService: trigger order.imported tylko gdy $wasCreated
- bin/backfill_shipped_status_98.php: jednorazowy CLI, w_realizacji + shipment -> wyslane (przez OrdersRepository::updateOrderStatus)
- backfill: 4 zamowienia naprawione (#275, #340, #396, #422), idempotentny

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 10:56:03 +02:00
parent 423829889e
commit 7eefd1af61
9 changed files with 431 additions and 9 deletions

View File

@@ -270,7 +270,7 @@ final class ShopproOrdersSyncService
);
}
if ($savedOrderId > 0 && !$wasPaymentTransition && $this->automationService !== null) {
if ($savedOrderId > 0 && $wasCreated && !$wasPaymentTransition && $this->automationService !== null) {
$this->automationService->trigger('order.imported', $savedOrderId, [
'source' => 'shoppro',
'created' => $wasCreated,