- 京东CreatePromotionSku超限处理
- 活动名字防重复 - 活动限购设置
This commit is contained in:
@@ -148,7 +148,7 @@ func storeSku2Jd(actStoreSku []*model.ActStoreSku2, handler func(syncStatus int)
|
||||
StationNo: utils.Str2Int64(v.VendorStoreID),
|
||||
SkuID: utils.Str2Int64(v.VendorSkuID),
|
||||
PromotionPrice: v.ActPrice,
|
||||
// LimitSkuCount:0,
|
||||
LimitSkuCount: v.Stock,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -161,10 +161,10 @@ func createSkuAct(ctx *jxcontext.Context, act *model.Act2, actStoreSku []*model.
|
||||
if act.VendorActID == "" {
|
||||
outInfoID = utils.Int2Str(act.ID)
|
||||
}
|
||||
infoID, err2 := CreatePromotionInfos(act.Type, act.Name, act.BeginAt, act.EndAt, outInfoID, act.Advertising, traceID)
|
||||
infoID, err2 := CreatePromotionInfos(act.Type, act.GetRealActName(), act.BeginAt, act.EndAt, outInfoID, act.Advertising, traceID)
|
||||
if err = err2; err == nil {
|
||||
vendorActID = utils.Int64ToStr(infoID)
|
||||
if err = CreatePromotionRules(act.Type, infoID, "", act.LimitDevice, act.LimitPin, act.LimitCount, act.LimitDaily, traceID); err == nil {
|
||||
if err = CreatePromotionRules(act.Type, infoID, "", 0, act.LimitUser, act.LimitCount, act.LimitDaily, traceID); err == nil {
|
||||
if _, err = CreatePromotionSku(act.Type, infoID, "", storeSku2Jd(actStoreSku, model.IsSyncStatusNeedCreate), traceID); err == nil {
|
||||
if err = ConfirmPromotion(act.Type, infoID, "", traceID); err == nil {
|
||||
for _, v := range actStoreSku {
|
||||
|
||||
Reference in New Issue
Block a user