feat(t224): add incremental freight sync

This commit is contained in:
QiuSW
2026-07-29 00:26:05 +08:00
parent 433db45100
commit c69879650e
35 changed files with 2085 additions and 156 deletions
@@ -9,6 +9,11 @@ import (
type FreightSource interface {
QueryOrder(context.Context, string) (domain.FreightSourceBatch, error)
QueryCreatedRange(
context.Context,
string,
string,
) (domain.FreightSourceBatch, error)
}
type FreightRepository interface {
@@ -25,6 +30,13 @@ type FreightRepository interface {
domain.FreightImportBatch,
time.Time,
) error
CompleteFreightDateSync(
context.Context,
domain.FreightSyncRun,
domain.FreightImportBatch,
time.Time,
time.Time,
) error
FailFreightSync(context.Context, string, string, time.Time) error
RecoverFreightSyncs(context.Context, time.Time) (int64, error)
GetFreightSync(
@@ -32,6 +44,10 @@ type FreightRepository interface {
string,
string,
) (domain.FreightSyncRun, error)
GetFreightSyncWatermark(
context.Context,
string,
) (*domain.FreightSyncWatermark, error)
ListFreightOrders(
context.Context,
string,