From e73225be507c259b6005ee00efd19c3fe600e444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 22 Dec 2020 15:57:04 +0800 Subject: [PATCH] err --- business/partner/delivery/fn/waybill.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/business/partner/delivery/fn/waybill.go b/business/partner/delivery/fn/waybill.go index 4af6c9568..2dc49689e 100644 --- a/business/partner/delivery/fn/waybill.go +++ b/business/partner/delivery/fn/waybill.go @@ -46,8 +46,10 @@ func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, OrderCancelCode: fnpsapi.OrderCancelReson8, OrderCancelTime: time.Now().UnixNano() / 1e6, }) - if strings.Contains(err.Error(), "运单暂未生成") { - err = nil + if err != nil { + if strings.Contains(err.Error(), "运单暂未生成") { + err = nil + } } return err }