1
This commit is contained in:
53
platformapi/mtwmapi/logistics_fee.go
Normal file
53
platformapi/mtwmapi/logistics_fee.go
Normal file
@@ -0,0 +1,53 @@
|
||||
package mtwmapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
// GetWayBillFee 获取美团众包配送费已经保险费
|
||||
func (a *API) GetWayBillFee(orderId string, serviceBrand int) (*GetOrderLogisticsFee, error) {
|
||||
data, err := a.AccessAPI("order/logistics/pt/preview", true, map[string]interface{}{"order_id": orderId, "service_brand": serviceBrand})
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("err := %v", err)
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println(data)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type GetOrderLogisticsFeeRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
data string `json:"data"`
|
||||
}
|
||||
|
||||
type GetOrderLogisticsFee struct {
|
||||
WmOrderId int64 `json:"wm_order_id"` // 订单id
|
||||
ShippingFee float64 `json:"shipping_fee"` // 配送费(基础+临时)
|
||||
OriginalPrice float64 `json:"original_price"` // 订单的总原价,单位为元此字段数据为未扣减所有优惠前订单的总金额,含打包袋、配送费等。
|
||||
LogisticsStatus int64 `json:"logistics_status"` // 美团配送订单状态code
|
||||
ShippingTips string `json:"shipping_tips"` // 配送费浮动说明
|
||||
PayAmount float64 `json:"pay_amount"` // 实付金额
|
||||
Distance int `json:"distance"` // 配送距离(m)
|
||||
CouponViewId string `json:"coupon_view_id"` // 配送费优惠券id
|
||||
CouponName string `json:"coupon_name"` // 优惠券名称
|
||||
CouponAmount float64 `json:"coupon_amount"` // 优惠券金额
|
||||
ReduceDetail ReduceDetailObj
|
||||
}
|
||||
|
||||
type ReduceDetailObj struct {
|
||||
UserTaskId int64 `json:"user_task_id"` // 立减活动id
|
||||
TaskId int64 `json:"task_id"` // 立减活动task id
|
||||
BmlAmount float64 `json:"bml_amount"` // 立减金额(元)
|
||||
}
|
||||
|
||||
func (a *API) GetShippingFeeList(orderIds string, serviceBrand int) (*GetOrderLogisticsFeeRes, error) {
|
||||
data, err := a.AccessAPI("order/zhongbao/shippingFee", true, map[string]interface{}{"order_id": orderIds, "service_brand": serviceBrand})
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("err := %v", err)
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println(data)
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user