1
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -555,16 +554,20 @@ func (a *API) OrderLogisticsCancel(orderID int64, reason string) (err error) {
|
||||
}
|
||||
|
||||
// OrderLogisticsStatus 获取订单状态
|
||||
func (a *API) OrderLogisticsStatus(orderID int64) (status int64, err error) {
|
||||
func (a *API) OrderLogisticsStatus(orderID int64) (status *utils.RiderInfo, err error) {
|
||||
result, err := a.AccessAPI("order/logistics/status", true, map[string]interface{}{
|
||||
KeyOrderID: orderID,
|
||||
})
|
||||
if err != nil {
|
||||
return 0, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
logistics := &utils.RiderInfo{}
|
||||
data := result.(map[string]interface{})
|
||||
return utils.Interface2Int64WithDefault(data["logistics_status"], 0), err
|
||||
logistics.LogisticsStatus = int(utils.Interface2Int64WithDefault(data["logistics_status"], 0))
|
||||
logistics.CourierName = utils.Interface2String(data["dispatcher_name"])
|
||||
logistics.CourierPhone = utils.Interface2String(data["dispatcher_mobile"])
|
||||
return logistics, err
|
||||
}
|
||||
|
||||
// OrderLogisticsFee 获取订单配送费
|
||||
@@ -572,7 +575,6 @@ func (a *API) OrderLogisticsFee(orderID int64) (payFee float64, err error) {
|
||||
result, err := a.AccessAPI("order/logistics/status", true, map[string]interface{}{
|
||||
KeyOrderID: orderID,
|
||||
})
|
||||
globals.SugarLogger.Debugf("=resutl := %s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user