- 重构配送门店管理

This commit is contained in:
gazebo
2019-07-23 14:29:58 +08:00
parent 79d81fdd73
commit 22737c7681
13 changed files with 325 additions and 159 deletions

View File

@@ -3,7 +3,9 @@ package partner
import (
"fmt"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
)
const (
@@ -28,12 +30,19 @@ type CreateWaybillPolicy func(refDeliveryFee, refAddFee, deliveryFee int64) (err
type IDeliveryPlatformHandler interface {
GetVendorID() int
CreateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (vendorStoreID string, status int, err error)
GetStore(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeDetail *dao.StoreDetail2, err error)
IsErrStoreNotExist(err error) bool
CreateWaybill(order *model.GoodsOrder, policy CreateWaybillPolicy) (bill *model.Waybill, err error)
CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error)
GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo *WaybillFeeInfo, err error)
}
type IDeliveryUpdateStoreHandler interface {
UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error)
}
type DeliveryPlatformHandlerInfo struct {
Handler IDeliveryPlatformHandler
Use4CreateWaybill bool