- 京东活动API加traceId参数
This commit is contained in:
@@ -53,27 +53,27 @@ func getPromotionCmd(inCmd string, promotionType int) (outCmd string) {
|
||||
|
||||
// 单品直降添加主活动信息接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=178&apiid=ee8685c9be9b4aa5bdc41468c5ebc33b
|
||||
func (a *API) CreatePromotionInfosSingle(name string, beginDate, endDate time.Time, outInfoId, advertising string) (infoId int64, err error) {
|
||||
return a.createPromotionInfos(PromotionTypeDirectDown, name, beginDate, endDate, outInfoId, advertising, "")
|
||||
func (a *API) CreatePromotionInfosSingle(name string, beginDate, endDate time.Time, outInfoId, advertising, traceId string) (infoId int64, err error) {
|
||||
return a.createPromotionInfos(PromotionTypeDirectDown, name, beginDate, endDate, outInfoId, advertising, traceId)
|
||||
}
|
||||
|
||||
// 单品直降添加活动规则信息接口
|
||||
// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=178&apiid=900a9577cb304bbbb59abb7c2c33854d
|
||||
func (a *API) CreatePromotionRulesSingle(infoId int64, outInfoId string, limitDevice, limitPin, limitCount, limitDaily int) (err error) {
|
||||
return a.createPromotionRules(PromotionTypeDirectDown, infoId, outInfoId, limitDevice, limitPin, limitCount, limitDaily, "")
|
||||
func (a *API) CreatePromotionRulesSingle(infoId int64, outInfoId string, limitDevice, limitPin, limitCount, limitDaily int, traceId string) (err error) {
|
||||
return a.createPromotionRules(PromotionTypeDirectDown, infoId, outInfoId, limitDevice, limitPin, limitCount, limitDaily, traceId)
|
||||
}
|
||||
|
||||
// 单品直降添加活动商品信息接口
|
||||
// 最多200条
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=178&apiid=0ad0715e0aaa42489cbeac36398e916d
|
||||
func (a *API) CreatePromotionSkuSingle(infoId int64, outInfoId string, skus []*PromotionSku) (skusResult []*PromotionSku, err error) {
|
||||
return a.createPromotionSku(PromotionTypeDirectDown, infoId, outInfoId, skus, "")
|
||||
func (a *API) CreatePromotionSkuSingle(infoId int64, outInfoId string, skus []*PromotionSku, traceId string) (skusResult []*PromotionSku, err error) {
|
||||
return a.createPromotionSku(PromotionTypeDirectDown, infoId, outInfoId, skus, traceId)
|
||||
}
|
||||
|
||||
// 单品直降活动提交保存接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=178&apiid=b84e14eb341e470db8ed9b60f78edb16
|
||||
func (a *API) ConfirmPromotionSingle(infoId int64, outInfoId string) (err error) {
|
||||
return a.confirmPromotion(PromotionTypeDirectDown, infoId, outInfoId, "")
|
||||
func (a *API) ConfirmPromotionSingle(infoId int64, outInfoId, traceId string) (err error) {
|
||||
return a.confirmPromotion(PromotionTypeDirectDown, infoId, outInfoId, traceId)
|
||||
}
|
||||
|
||||
// 单品直降活动部分商品取消接口
|
||||
@@ -84,35 +84,35 @@ func (a *API) CancelPromotionSkuSingle(infoId int64, outInfoId string, cancelSku
|
||||
|
||||
// 单品直降整个活动取消接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=178&apiid=3d02c2acad714bea86d20d498a1aa074
|
||||
func (a *API) CancelPromotionSingle(infoId int64, outInfoId string) (err error) {
|
||||
return a.cancelPromotion(PromotionTypeDirectDown, infoId, outInfoId, "")
|
||||
func (a *API) CancelPromotionSingle(infoId int64, outInfoId, traceId string) (err error) {
|
||||
return a.cancelPromotion(PromotionTypeDirectDown, infoId, outInfoId, traceId)
|
||||
}
|
||||
|
||||
// 以下为限时抢
|
||||
|
||||
// 限时抢添加活动主信息接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=184&apiid=7d8b7ff86c9e457bb8a46963cb575769
|
||||
func (a *API) CreatePromotionInfosLimitTime(name string, beginDate, endDate time.Time, outInfoId, advertising string) (infoId int64, err error) {
|
||||
return a.createPromotionInfos(PromotionTypeLimitedTime, name, beginDate, endDate, outInfoId, advertising, "")
|
||||
func (a *API) CreatePromotionInfosLimitTime(name string, beginDate, endDate time.Time, outInfoId, advertising, traceId string) (infoId int64, err error) {
|
||||
return a.createPromotionInfos(PromotionTypeLimitedTime, name, beginDate, endDate, outInfoId, advertising, traceId)
|
||||
}
|
||||
|
||||
// 限时抢添加活动规则信息接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=184&apiid=e80674791d3542f0a87502753c0d0592
|
||||
func (a *API) CreatePromotionRulesLimitTime(infoId int64, outInfoId string, limitDevice, limitPin, limitCount, limitDaily int) (err error) {
|
||||
return a.createPromotionRules(PromotionTypeLimitedTime, infoId, outInfoId, limitDevice, limitPin, limitCount, limitDaily, "")
|
||||
func (a *API) CreatePromotionRulesLimitTime(infoId int64, outInfoId string, limitDevice, limitPin, limitCount, limitDaily int, traceId string) (err error) {
|
||||
return a.createPromotionRules(PromotionTypeLimitedTime, infoId, outInfoId, limitDevice, limitPin, limitCount, limitDaily, traceId)
|
||||
}
|
||||
|
||||
// 限时抢添加活动商品信息接口
|
||||
// 最多200条
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=184&apiid=65fecef4883c40c6b23bbdb6123f5d80
|
||||
func (a *API) CreatePromotionSkuLimitTime(infoId int64, outInfoId string, skus []*PromotionSku) (skusResult []*PromotionSku, err error) {
|
||||
return a.createPromotionSku(PromotionTypeLimitedTime, infoId, outInfoId, skus, "")
|
||||
func (a *API) CreatePromotionSkuLimitTime(infoId int64, outInfoId string, skus []*PromotionSku, traceId string) (skusResult []*PromotionSku, err error) {
|
||||
return a.createPromotionSku(PromotionTypeLimitedTime, infoId, outInfoId, skus, traceId)
|
||||
}
|
||||
|
||||
// 限时抢活动提交保存接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=184&apiid=3991063e2f0d435094e9fe44754f3490
|
||||
func (a *API) ConfirmPromotionLimitTime(infoId int64, outInfoId string) (err error) {
|
||||
return a.confirmPromotion(PromotionTypeLimitedTime, infoId, outInfoId, "")
|
||||
func (a *API) ConfirmPromotionLimitTime(infoId int64, outInfoId, traceId string) (err error) {
|
||||
return a.confirmPromotion(PromotionTypeLimitedTime, infoId, outInfoId, traceId)
|
||||
}
|
||||
|
||||
// 限时抢活动取消部分商品接口
|
||||
@@ -123,8 +123,8 @@ func (a *API) CancelPromotionSkuLimitTime(infoId int64, outInfoId string, cancel
|
||||
|
||||
// 限时抢整个活动取消接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=184&apiid=97b6678d30624f73bc13cb68987e6a6d
|
||||
func (a *API) CancelPromotionLimitTime(infoId int64, outInfoId string) (err error) {
|
||||
return a.cancelPromotion(PromotionTypeLimitedTime, infoId, outInfoId, "")
|
||||
func (a *API) CancelPromotionLimitTime(infoId int64, outInfoId, traceId string) (err error) {
|
||||
return a.cancelPromotion(PromotionTypeLimitedTime, infoId, outInfoId, traceId)
|
||||
}
|
||||
|
||||
func (a *API) createPromotionInfos(promotionType int, name string, beginDate, endDate time.Time, outInfoId, advertising, traceId string) (infoId int64, err error) {
|
||||
|
||||
Reference in New Issue
Block a user