67 lines
1.3 KiB
Go
67 lines
1.3 KiB
Go
package usecase
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"cmroubao/backend-api/internal/domain"
|
|
)
|
|
|
|
type FreightSource interface {
|
|
QueryOrder(context.Context, string) (domain.FreightSourceBatch, error)
|
|
QueryCreatedRange(
|
|
context.Context,
|
|
string,
|
|
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
|
|
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(
|
|
context.Context,
|
|
string,
|
|
string,
|
|
) (domain.FreightSyncRun, error)
|
|
GetFreightSyncWatermark(
|
|
context.Context,
|
|
string,
|
|
) (*domain.FreightSyncWatermark, error)
|
|
ListFreightOrders(
|
|
context.Context,
|
|
string,
|
|
int,
|
|
) ([]domain.FreightOrder, error)
|
|
GetFreightOrder(
|
|
context.Context,
|
|
string,
|
|
string,
|
|
) (domain.FreightOrderDetail, error)
|
|
DeleteFreightOrder(
|
|
context.Context,
|
|
string,
|
|
string,
|
|
) ([]string, error)
|
|
}
|