- 根据京东回调存储京东到家活动信息至本地
This commit is contained in:
@@ -9,6 +9,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
)
|
||||
|
||||
type IActManager interface {
|
||||
IsVendorActExist(ctx *jxcontext.Context, vendorActID string, vendorID int) (isExist bool)
|
||||
CreateActFromVendor(ctx *jxcontext.Context, act2 *model.Act2, actStoreSku []*model.ActStoreSku2) (actID int, err error)
|
||||
}
|
||||
|
||||
type IPurchasePlatformActHandler interface {
|
||||
// // 如果是单品级活动,actOrderRules为空
|
||||
// // 如果是订单级活动,actStoreSku可以为空(表示不限制SKU)
|
||||
@@ -20,6 +25,14 @@ type IPurchasePlatformActHandler interface {
|
||||
SyncAct(ctx *jxcontext.Context, parentTask tasksch.ITask, act *model.Act2, actOrderRules []*model.ActOrderRule, actStoreSkuList []*model.ActStoreSku2) (err error)
|
||||
}
|
||||
|
||||
var (
|
||||
CurActManager IActManager
|
||||
)
|
||||
|
||||
func InitActManager(p IActManager) {
|
||||
CurActManager = p
|
||||
}
|
||||
|
||||
func SplitActStoreSku(actStoreSkuList []*model.ActStoreSku2) (actStoreSkuMap map[int][]*model.ActStoreSku2) {
|
||||
actStoreSkuMap = make(map[int][]*model.ActStoreSku2)
|
||||
for _, v := range actStoreSkuList {
|
||||
|
||||
Reference in New Issue
Block a user