修改美团配送费
This commit is contained in:
@@ -118,9 +118,10 @@ type OrderInfo struct {
|
||||
}
|
||||
|
||||
type OrderResponse struct {
|
||||
MtPeisongID string `json:"mt_peisong_id"`
|
||||
DeliveryID int64 `json:"delivery_id"`
|
||||
OrderID string `json:"order_id"`
|
||||
MtPeisongID string `json:"mt_peisong_id"`
|
||||
DeliveryID int64 `json:"delivery_id"`
|
||||
OrderID string `json:"order_id"`
|
||||
DeliveryFee float64 `json:"delivery_fee"`
|
||||
}
|
||||
|
||||
type ResponseResult struct {
|
||||
@@ -287,11 +288,13 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
|
||||
return a.AccessAPI2(mtpsAPIURL, action, params)
|
||||
}
|
||||
|
||||
// 获取美团配送内部订单id,外部系统订单id,美团配送费用
|
||||
func (a *API) result2OrderResponse(result *ResponseResult) (order *OrderResponse) {
|
||||
order = new(OrderResponse)
|
||||
order.MtPeisongID = result.Data["mt_peisong_id"].(string)
|
||||
order.DeliveryID = utils.MustInterface2Int64(result.Data["delivery_id"])
|
||||
order.OrderID = result.Data["order_id"].(string)
|
||||
order.DeliveryFee = utils.MustInterface2Float64(result.Data["delivery_fee"])
|
||||
return order
|
||||
}
|
||||
|
||||
@@ -311,6 +314,7 @@ func (a *API) CreateOrderByShop(basicParams *CreateOrderByShopParam, addParams m
|
||||
}
|
||||
}
|
||||
|
||||
// 获取美团订单费用
|
||||
func (a *API) CreateOrderByShop2(basicParams *CreateOrderByShopParam) (order *OrderResponse, err error) {
|
||||
params := utils.Struct2MapByJson(basicParams)
|
||||
if basicParams.OrderType != OrderTypeBook {
|
||||
|
||||
Reference in New Issue
Block a user