- 重构创建运单策略

This commit is contained in:
gazebo
2019-03-30 15:00:59 +08:00
parent 68b5ec38b6
commit 10a444c895
11 changed files with 142 additions and 125 deletions

View File

@@ -146,8 +146,10 @@ type ISingleStoreHandler interface {
RefreshStoresAllSkusID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool, storeIDs []int) (hint string, err error)
}
type CreateWaybillPolicy func(refDeliveryFee, refAddFee, deliveryFee int64) (errStr string)
type IDeliveryPlatformHandler interface {
CreateWaybill(order *model.GoodsOrder, policy func(deliveryFee, addFee int64) error) (bill *model.Waybill, err error)
CreateWaybill(order *model.GoodsOrder, policy CreateWaybillPolicy) (bill *model.Waybill, err error)
CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error)
GetVendorID() int