- 根据京东回调存储京东到家活动信息至本地

This commit is contained in:
gazebo
2019-07-08 17:01:17 +08:00
parent 6c4ca2fd17
commit 9d08a1bcc9
9 changed files with 301 additions and 42 deletions

View File

@@ -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 {