- 修复美团外卖几个API没有调用MustMarshal
This commit is contained in:
@@ -118,7 +118,7 @@ func (a *API) OrderApplyPartRefund(orderID int64, reason string, removeSkuList [
|
|||||||
_, err = a.AccessAPI("order/applyPartRefund", false, map[string]interface{}{
|
_, err = a.AccessAPI("order/applyPartRefund", false, map[string]interface{}{
|
||||||
KeyOrderID: orderID,
|
KeyOrderID: orderID,
|
||||||
"reason": reason,
|
"reason": reason,
|
||||||
"food_data": removeSkuList,
|
"food_data": string(utils.MustMarshal(removeSkuList)),
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ func (a *API) RetailBatchInitData(poiCode string, foodDataList []map[string]inte
|
|||||||
func (a *API) RetailSkuPrice(poiCode string, foodData []map[string]interface{}) (err error) {
|
func (a *API) RetailSkuPrice(poiCode string, foodData []map[string]interface{}) (err error) {
|
||||||
_, err = a.AccessAPI("retail/sku/price", false, map[string]interface{}{
|
_, err = a.AccessAPI("retail/sku/price", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
"food_data": foodData,
|
"food_data": string(utils.MustMarshal(foodData)),
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ func (a *API) RetailSkuPrice(poiCode string, foodData []map[string]interface{})
|
|||||||
func (a *API) RetailSkuStock(poiCode string, foodData []map[string]interface{}) (err error) {
|
func (a *API) RetailSkuStock(poiCode string, foodData []map[string]interface{}) (err error) {
|
||||||
_, err = a.AccessAPI("retail/sku/stock", false, map[string]interface{}{
|
_, err = a.AccessAPI("retail/sku/stock", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
"food_data": foodData,
|
"food_data": string(utils.MustMarshal(foodData)),
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -131,8 +131,8 @@ func (a *API) RetailSkuSave(poiCode, foodCode string, standardSkus, unstandardSk
|
|||||||
_, err = a.AccessAPI("retail/sku/save", false, map[string]interface{}{
|
_, err = a.AccessAPI("retail/sku/save", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
KeyAppFoodCode: foodCode,
|
KeyAppFoodCode: foodCode,
|
||||||
"standard_skus": standardSkus,
|
"standard_skus": string(utils.MustMarshal(standardSkus)),
|
||||||
"unstandard_skus": unstandardSkus,
|
"unstandard_skus": string(utils.MustMarshal(unstandardSkus)),
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ func (a *API) RetailSkuSave(poiCode, foodCode string, standardSkus, unstandardSk
|
|||||||
func (a *API) RetailSkuSellStatus(poiCode string, foodData []map[string]interface{}, sellStatus int) (err error) {
|
func (a *API) RetailSkuSellStatus(poiCode string, foodData []map[string]interface{}, sellStatus int) (err error) {
|
||||||
_, err = a.AccessAPI("retail/sku/sellStatus", false, map[string]interface{}{
|
_, err = a.AccessAPI("retail/sku/sellStatus", false, map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
"food_data": foodData,
|
"food_data": string(utils.MustMarshal(foodData)),
|
||||||
"sell_status": sellStatus,
|
"sell_status": sellStatus,
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user