feat(t222): add freight ingestion admin flow

This commit is contained in:
QiuSW
2026-07-28 23:26:34 +08:00
parent c524e734fb
commit 6d052b0462
37 changed files with 3397 additions and 101 deletions
@@ -0,0 +1,45 @@
package usecase
import (
"context"
"time"
"cmroubao/backend-api/internal/domain"
)
type FreightSource interface {
QueryOrder(context.Context, string) (domain.FreightSourceBatch, error)
}
type FreightRepository interface {
CreateFreightSync(
context.Context,
domain.FreightSyncRun,
string,
string,
) (domain.FreightSyncRun, bool, error)
StartFreightSync(context.Context, string, time.Time) error
CompleteFreightSync(
context.Context,
domain.FreightSyncRun,
domain.FreightImportBatch,
time.Time,
) error
FailFreightSync(context.Context, string, string, time.Time) error
RecoverFreightSyncs(context.Context, time.Time) (int64, error)
GetFreightSync(
context.Context,
string,
string,
) (domain.FreightSyncRun, error)
ListFreightOrders(
context.Context,
string,
int,
) ([]domain.FreightOrder, error)
GetFreightOrder(
context.Context,
string,
string,
) (domain.FreightOrderDetail, error)
}