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
+28 -14
View File
@@ -5,6 +5,7 @@ import "time"
const (
FreightSourceShunyunbao = "SHUNYUNBAO"
FreightSyncOrderNumber = "ORDER_NUMBER"
FreightSyncCreatedRange = "CREATED_RANGE"
)
type FreightSyncStatus string
@@ -17,19 +18,22 @@ const (
)
type FreightSyncRun struct {
ID string
CreatorSubject string
CreatedByUserID string
Mode string
OrderNumber string
QuerySHA256 string
Status FreightSyncStatus
ErrorCode *string
OrderCount int
ItemCount int
CreatedAt time.Time
StartedAt *time.Time
FinishedAt *time.Time
ID string
CreatorSubject string
CreatedByUserID string
Mode string
OrderNumber string
CreatedFrom string
CreatedTo string
WatermarkThrough *time.Time
QuerySHA256 string
Status FreightSyncStatus
ErrorCode *string
OrderCount int
ItemCount int
CreatedAt time.Time
StartedAt *time.Time
FinishedAt *time.Time
}
type FreightOrder struct {
@@ -84,7 +88,17 @@ type FreightSourceBatch struct {
}
type FreightSourceQuery struct {
Mode string `json:"mode"`
Mode string `json:"mode"`
CreatedFrom *string `json:"created_from"`
CreatedTo *string `json:"created_to"`
}
type FreightSyncWatermark struct {
CreatorSubject string
SourceSystem string
LastSuccessfulTo time.Time
LastSuccessfulRunID string
UpdatedAt time.Time
}
type FreightSourceOrder struct {