ActMap添加VendorOrgCode
京东活动依赖VendorOrgCode
This commit is contained in:
@@ -115,7 +115,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
if !(len(vendorIDs) == 1 && vendorIDs[0] == model.VendorIDJD || act.Type == model.ActSkuFake) {
|
||||
effectActStoreSkuList, err := dao.GetEffectiveActStoreSkuInfo(db, 0, vendorIDs, storeIDs, skuIDs, act.BeginAt, act.EndAt)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Errorf("updateActPrice4StoreSkuNameNew can not get sku promotion info for error:%v", err)
|
||||
globals.SugarLogger.Errorf("GetEffectiveActStoreSkuInfo can not get sku promotion info for error:%v", err)
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
if len(effectActStoreSkuList) > 0 {
|
||||
@@ -402,7 +402,7 @@ func PreCreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, actRu
|
||||
return preCreateActInfo, nil
|
||||
}
|
||||
|
||||
func CreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, actRules []*ActOrderRuleParam, actStoreSku []*ActStoreSkuParam, isAsync bool) (hint string, err error) {
|
||||
func CreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, vendorOrgCode string, actRules []*ActOrderRuleParam, actStoreSku []*ActStoreSkuParam, isAsync bool) (hint string, err error) {
|
||||
if err = checkActValidation(act, vendorIDs); err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -437,8 +437,9 @@ func CreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, actRules
|
||||
var actMapList []*model.ActMap
|
||||
for _, vendorID := range validVendorIDs {
|
||||
actMap := &model.ActMap{
|
||||
ActID: act.ID,
|
||||
VendorID: vendorID,
|
||||
ActID: act.ID,
|
||||
VendorID: vendorID,
|
||||
VendorOrgCode: vendorOrgCode,
|
||||
}
|
||||
if !(vendorID == model.VendorIDJX || act.Type == model.ActSkuFake) {
|
||||
actMap.SyncStatus = model.SyncFlagNewMask
|
||||
|
||||
@@ -565,7 +565,7 @@ func updateActPrice4StoreSkuNameNew(db *dao.DaoDB, storeIDs, skuIDs []int, skuNa
|
||||
}
|
||||
actStoreSkuList, err := dao.GetEffectiveActStoreSkuInfo(db, 0, vendorIDs, storeIDs, skuIDs, time.Now(), time.Now())
|
||||
if err != nil {
|
||||
globals.SugarLogger.Errorf("updateActPrice4StoreSkuNameNew can not get sku promotion info for error:%v", err)
|
||||
globals.SugarLogger.Errorf("GetEffectiveActStoreSkuInfo can not get sku promotion info for error:%v", err)
|
||||
return err
|
||||
}
|
||||
actStoreSkuMap4Act := jxutils.NewActStoreSkuMap(actStoreSkuList, true)
|
||||
|
||||
Reference in New Issue
Block a user