From 7b9f8b914e31048a1f5aa0095127b6655ec95a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Sat, 16 Apr 2022 15:39:33 +0800 Subject: [PATCH] 1 --- platformapi/mtwmapi/order.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/platformapi/mtwmapi/order.go b/platformapi/mtwmapi/order.go index 33d66ec2..82f916f0 100644 --- a/platformapi/mtwmapi/order.go +++ b/platformapi/mtwmapi/order.go @@ -1,9 +1,9 @@ package mtwmapi import ( - "time" - "git.rosy.net.cn/baseapi/utils" + "time" + "errors" ) const ( @@ -391,9 +391,15 @@ func (a *API) OrderCancel(orderID int64, cancelReason string, cancelReasonCode i } func (a *API) OrderDelivering(orderID int64) (err error) { - _, err = a.AccessAPI("order/delivering", true, map[string]interface{}{ + retval, err := a.AccessAPI("order/delivering", true, map[string]interface{}{ KeyOrderID: orderID, }) + if err != nil { + return err + } + if retval.(map[string]interface{})["data"] != "ok" { + return errors.New(utils.Interface2String(retval.(map[string]interface{})["msg"])) + } return err }