This commit is contained in:
richboo111
2022-11-16 10:20:12 +08:00
parent 632cd169af
commit 59fdc63f78
2 changed files with 21 additions and 1 deletions

View File

@@ -67,6 +67,11 @@ type API struct {
config *platformapi.APIConfig
}
func (a *API) Error() string {
//TODO implement me
panic("implement me")
}
var (
canRetryCodes = map[int]int{
ErrCodeAccessLimited: 1,

View File

@@ -478,7 +478,22 @@ func (a *API) RetailCatSkuBatchDelete2(trackInfo, poiCode string, catCodes, catN
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) {
mapData, ok := data.(map[string]interface{})