- 美团活动API注释
This commit is contained in:
@@ -124,6 +124,8 @@ type RetailActDataLimit struct {
|
|||||||
OrderLimit int `json:"order_limit,omitempty"` // 每单可购买的折扣商品数量
|
OrderLimit int `json:"order_limit,omitempty"` // 每单可购买的折扣商品数量
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量创建指定商品满减活动或创建店内满减活动
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/255
|
||||||
func (a *API) FullDiscountBatchSave(poiCode string, actInfo *FullDiscountActInfo, actList []*FullDiscountActDetail, actSkuList []*FullDiscountSku) (actID int64, err error) {
|
func (a *API) FullDiscountBatchSave(poiCode string, actInfo *FullDiscountActInfo, actList []*FullDiscountActDetail, actSkuList []*FullDiscountSku) (actID int64, err error) {
|
||||||
params := map[string]interface{}{
|
params := map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -140,6 +142,8 @@ func (a *API) FullDiscountBatchSave(poiCode string, actInfo *FullDiscountActInfo
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量查询指定商品满减活动或店内满减活动
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/256
|
||||||
func (a *API) FullDiscountList(poiCode string, actType int) (actInfoList []*FullDiscountActData, err error) {
|
func (a *API) FullDiscountList(poiCode string, actType int) (actInfoList []*FullDiscountActData, err error) {
|
||||||
result, err := a.AccessAPI("act/full/discount/list", false, map[string]interface{}{
|
result, err := a.AccessAPI("act/full/discount/list", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -151,6 +155,8 @@ func (a *API) FullDiscountList(poiCode string, actType int) (actInfoList []*Full
|
|||||||
return actInfoList, err
|
return actInfoList, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量删除指定商品满减活动或店内满减活动
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/257
|
||||||
func (a *API) FullDiscountDelete(poiCode string, actIDList []string, actType int) (err error) {
|
func (a *API) FullDiscountDelete(poiCode string, actIDList []string, actType int) (err error) {
|
||||||
_, err = a.AccessAPI("act/full/discount/delete", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/full/discount/delete", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -160,6 +166,8 @@ func (a *API) FullDiscountDelete(poiCode string, actIDList []string, actType int
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量添加活动商品至指定商品满减活动
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/258
|
||||||
func (a *API) FullDiscountFoodsBatchSave(poiCode, actID string, appFoodList []*FullDiscountSku) (err error) {
|
func (a *API) FullDiscountFoodsBatchSave(poiCode, actID string, appFoodList []*FullDiscountSku) (err error) {
|
||||||
_, err = a.AccessAPI("act/full/discount/foods/batchsave", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/full/discount/foods/batchsave", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -169,6 +177,8 @@ func (a *API) FullDiscountFoodsBatchSave(poiCode, actID string, appFoodList []*F
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量查询指定商品满减活动中的活动商品
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/259
|
||||||
func (a *API) FullDiscountFoodsList(poiCode, actID string) (actFoodsInfo *FullDiscountFoodsInfo, err error) {
|
func (a *API) FullDiscountFoodsList(poiCode, actID string) (actFoodsInfo *FullDiscountFoodsInfo, err error) {
|
||||||
limit := 200
|
limit := 200
|
||||||
for {
|
for {
|
||||||
@@ -201,6 +211,7 @@ func (a *API) FullDiscountFoodsList(poiCode, actID string) (actFoodsInfo *FullDi
|
|||||||
|
|
||||||
// 批量删除活动商品至指定商品满减活动
|
// 批量删除活动商品至指定商品满减活动
|
||||||
// appFoodCodeList 删除商品数量上限为100,如果删除门店多个活动商品,用英文逗号隔开
|
// appFoodCodeList 删除商品数量上限为100,如果删除门店多个活动商品,用英文逗号隔开
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/260
|
||||||
func (a *API) FullDiscountFoodsDelete(poiCode, actID string, appFoodCodeList []string) (err error) {
|
func (a *API) FullDiscountFoodsDelete(poiCode, actID string, appFoodCodeList []string) (err error) {
|
||||||
_, err = a.AccessAPI("act/full/discount/foods/delete", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/full/discount/foods/delete", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -211,6 +222,7 @@ func (a *API) FullDiscountFoodsDelete(poiCode, actID string, appFoodCodeList []s
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 批量修改指定商品满减活动中商品的当日活动库存
|
// 批量修改指定商品满减活动中商品的当日活动库存
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/261
|
||||||
func (a *API) FullDiscountFoodsDayLimit(poiCode, actID string, appFoodList []*FullDiscountSku) (err error) {
|
func (a *API) FullDiscountFoodsDayLimit(poiCode, actID string, appFoodList []*FullDiscountSku) (err error) {
|
||||||
_, err = a.AccessAPI("act/full/discount/foods/daylimit", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/full/discount/foods/daylimit", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -222,6 +234,7 @@ func (a *API) FullDiscountFoodsDayLimit(poiCode, actID string, appFoodList []*Fu
|
|||||||
|
|
||||||
// 阶梯满减配送费活动一个门店只可能有一个活动,所以不涉及actID的概念
|
// 阶梯满减配送费活动一个门店只可能有一个活动,所以不涉及actID的概念
|
||||||
// 批量创建阶梯满减配送费活动
|
// 批量创建阶梯满减配送费活动
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/281
|
||||||
func (a *API) FulllDiscountShippingFeeBatchSave(poiCode string, actData []*ShippingFeeActData) (err error) {
|
func (a *API) FulllDiscountShippingFeeBatchSave(poiCode string, actData []*ShippingFeeActData) (err error) {
|
||||||
_, err = a.AccessAPI("act/full/discount/shippingfee/batchsave", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/full/discount/shippingfee/batchsave", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -231,6 +244,7 @@ func (a *API) FulllDiscountShippingFeeBatchSave(poiCode string, actData []*Shipp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询阶梯满减配送费活动
|
// 查询阶梯满减配送费活动
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/282
|
||||||
func (a *API) FulllDiscountShippingFeeList(poiCode string) (actList []*ShippingFeeActData, err error) {
|
func (a *API) FulllDiscountShippingFeeList(poiCode string) (actList []*ShippingFeeActData, err error) {
|
||||||
result, err := a.AccessAPI("act/full/discount/shippingfee/list", true, map[string]interface{}{
|
result, err := a.AccessAPI("act/full/discount/shippingfee/list", true, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -241,7 +255,18 @@ func (a *API) FulllDiscountShippingFeeList(poiCode string) (actList []*ShippingF
|
|||||||
return actList, err
|
return actList, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量删除阶梯满减配送费活动
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/283
|
||||||
|
func (a *API) FulllDiscountShippingFeeBatchDelete(poiCode string, actIDList []string) (err error) {
|
||||||
|
_, err = a.AccessAPI("act/full/discount/shippingfee/batchdelete", false, map[string]interface{}{
|
||||||
|
KeyAppPoiCode: poiCode,
|
||||||
|
"act_ids": strings.Join(actIDList, ","),
|
||||||
|
})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// 批量创建或更新零售折扣商品
|
// 批量创建或更新零售折扣商品
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/287
|
||||||
func (a *API) RetailDiscountBatchSave(poiCode string, actData []*RetailActData) (actID int64, err error) {
|
func (a *API) RetailDiscountBatchSave(poiCode string, actData []*RetailActData) (actID int64, err error) {
|
||||||
result, err := a.AccessAPI2("act/retail/discount/batchsave", false, map[string]interface{}{
|
result, err := a.AccessAPI2("act/retail/discount/batchsave", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -254,6 +279,7 @@ func (a *API) RetailDiscountBatchSave(poiCode string, actData []*RetailActData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询门店零售折扣商品
|
// 查询门店零售折扣商品
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/288
|
||||||
func (a *API) RetailDiscountList(poiCode string) (actList []*RetailActData, err error) {
|
func (a *API) RetailDiscountList(poiCode string) (actList []*RetailActData, err error) {
|
||||||
limit := 200
|
limit := 200
|
||||||
offset := 0
|
offset := 0
|
||||||
@@ -281,6 +307,7 @@ func (a *API) RetailDiscountList(poiCode string) (actList []*RetailActData, err
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 批量删除零售折扣商品
|
// 批量删除零售折扣商品
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/289
|
||||||
func (a *API) RetailDiscountDelete(poiCode string, actIDList []string) (err error) {
|
func (a *API) RetailDiscountDelete(poiCode string, actIDList []string) (err error) {
|
||||||
_, err = a.AccessAPI("act/retail/discount/batchdelete", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/retail/discount/batchdelete", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -290,6 +317,7 @@ func (a *API) RetailDiscountDelete(poiCode string, actIDList []string) (err erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 批量修改零售折扣商品当日活动库存
|
// 批量修改零售折扣商品当日活动库存
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/290
|
||||||
func (a *API) RetailDiscountBatchStock(poiCode, actDataList []*RetailActDataLimit) (err error) {
|
func (a *API) RetailDiscountBatchStock(poiCode, actDataList []*RetailActDataLimit) (err error) {
|
||||||
_, err = a.AccessAPI("act/retail/discount/batchstock", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/retail/discount/batchstock", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
@@ -299,6 +327,7 @@ func (a *API) RetailDiscountBatchStock(poiCode, actDataList []*RetailActDataLimi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 批量修改零售折扣商品每单限购数量
|
// 批量修改零售折扣商品每单限购数量
|
||||||
|
// http://developer.waimai.meituan.com/home/docDetail/291
|
||||||
func (a *API) RetailDiscountBatchLimit(poiCode, actDataList []*RetailActDataLimit) (err error) {
|
func (a *API) RetailDiscountBatchLimit(poiCode, actDataList []*RetailActDataLimit) (err error) {
|
||||||
_, err = a.AccessAPI("act/retail/discount/batchlimit", false, map[string]interface{}{
|
_, err = a.AccessAPI("act/retail/discount/batchlimit", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
|
|||||||
Reference in New Issue
Block a user