From f09ac6239816a5ecef32ffc77ec2b7869837ddb8 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, 30 Jun 2020 15:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=BD=AC=E7=A7=BB=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 12 +++++++----- business/partner/purchase/jdshop/store_sku.go | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 63ddab5dc..89c3637b5 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1212,11 +1212,13 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) waybill = v } } - if waybill.WaybillVendorID != model.VendorIDJDWL { - handler := partner.DeliveryPlatformHandlers[waybill.WaybillVendorID] - err = handler.Handler.CancelWaybill(waybill, 0, "订单转移被取消") - if err != nil { - return "", err + if waybill != nil { + if waybill.WaybillVendorID != model.VendorIDJDWL { + handler := partner.DeliveryPlatformHandlers[waybill.WaybillVendorID] + err = handler.Handler.CancelWaybill(waybill, 0, "订单转移被取消") + if err != nil { + return "", err + } } } } diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index 921f2dc29..fac104bf7 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -24,6 +24,7 @@ import ( const ( deleteErr1 = "已经删除的不能直接下架" + deleteErr2 = "SKU不存在" ) var (