1
This commit is contained in:
@@ -67,6 +67,11 @@ type API struct {
|
|||||||
config *platformapi.APIConfig
|
config *platformapi.APIConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *API) Error() string {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
canRetryCodes = map[int]int{
|
canRetryCodes = map[int]int{
|
||||||
ErrCodeAccessLimited: 1,
|
ErrCodeAccessLimited: 1,
|
||||||
|
|||||||
@@ -478,7 +478,22 @@ func (a *API) RetailCatSkuBatchDelete2(trackInfo, poiCode string, catCodes, catN
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////
|
type SpuData struct {
|
||||||
|
AppSpuCode string `json:"appSpuCode"` //商家中台系统里商品的编码
|
||||||
|
SkuID string `json:"skuID"` //SKU码(商家的规格编码)
|
||||||
|
PurchasePrice string `json:"purchasePrice"` //商品进货价
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://opendj.meituan.com/home/docDetail/821
|
||||||
|
// 【代运营】批量更新商品进货价 /retail/purchase/price/update
|
||||||
|
func (a *API) BatchSetRestockingPrice(trackInfo, appPoiCode string, spuData []*SpuData) error {
|
||||||
|
_, err := a.AccessAPI2("/retail/purchase/price/update", false, map[string]interface{}{
|
||||||
|
KeyAppPoiCode: appPoiCode,
|
||||||
|
"spu_data": spuData,
|
||||||
|
}, resultKeyMsg, trackInfo)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// 私有辅助函数
|
// 私有辅助函数
|
||||||
func interface2Cat(data interface{}, level int) (cat *RetailCategoryInfo) {
|
func interface2Cat(data interface{}, level int) (cat *RetailCategoryInfo) {
|
||||||
mapData, ok := data.(map[string]interface{})
|
mapData, ok := data.(map[string]interface{})
|
||||||
|
|||||||
Reference in New Issue
Block a user