diff --git a/business/partner/purchase/jdshop/callback.go b/business/partner/purchase/jdshop/callback.go index 19e27a7ba..0ae0945c2 100644 --- a/business/partner/purchase/jdshop/callback.go +++ b/business/partner/purchase/jdshop/callback.go @@ -34,7 +34,10 @@ func OnCallbackMsg(msg *jdshopapi.CallBackResult) (err error) { }) case jcqapi.TopicOrderCancel: utils.CallFuncAsync(func() { - CurPurchaseHandler.CancelOrder(jxcontext.AdminCtx, getRealOrderID(msg.OrderID), "系统取消") + order := getRealOrderID(msg.OrderID) + if order != nil { + CurPurchaseHandler.CancelOrder(jxcontext.AdminCtx, order, "系统取消") + } }) default: return fmt.Errorf("暂不支持的topic类型!topic: %v", msgType)