- 当创建平台活动失败时,尽量清除
This commit is contained in:
@@ -100,7 +100,9 @@ func createOneShopAct(act *model.Act2, shopID string, oneStoreActSku []*model.Ac
|
||||
ebaiActID, err2 := api.EbaiAPI.ActivityCreate(shopID, 0, 0, activity)
|
||||
if err = err2; err == nil {
|
||||
ebaiActIDStr = utils.Int64ToStr(ebaiActID)
|
||||
_, err = ActivitySkuAddBatch(ebaiActID, shopID, 0, activity.ActivityType, actStoreSu2Ebai4Add(oneStoreActSku), false)
|
||||
if _, err = ActivitySkuAddBatch(ebaiActID, shopID, 0, activity.ActivityType, actStoreSu2Ebai4Add(oneStoreActSku), false); err != nil {
|
||||
ActivityDisable(ebaiActID, shopID, 0, 0)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ebaiActIDStr = utils.Int64ToStr(jxutils.GenFakeID())
|
||||
|
||||
@@ -173,6 +173,9 @@ func createSkuAct(ctx *jxcontext.Context, act *model.Act2, actStoreSku []*model.
|
||||
}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
CancelPromotion(act.Type, infoID, "", traceID)
|
||||
}
|
||||
}
|
||||
return vendorActID, err
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type ActController struct {
|
||||
// @Description 创建活动
|
||||
// @Param token header string true "认证token"
|
||||
// @Param name formData string true "活动名,必须唯一(所以名子上最好带上日期)"
|
||||
// @Param type formData int true "活动类型,3:直降,4:秒杀"
|
||||
// @Param type formData int true "活动类型,3:直降,4:秒杀(美团当前不支持秒杀)"
|
||||
// @Param vendorIDs formData string true "厂商ID,当前只支持,京东:0,京西(用于记录活动信息):99"
|
||||
// @Param beginAt formData string true "开始日期"
|
||||
// @Param endAt formData string true "结束日期"
|
||||
|
||||
Reference in New Issue
Block a user