From 98c608b6494c73215f1abe2f381b9b7d485f0d59 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 21 Feb 2020 10:59:38 +0800 Subject: [PATCH] dadadelivery Notify --- controllers/dada_order.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/dada_order.go b/controllers/dada_order.go index afc6adade..eaac778f0 100644 --- a/controllers/dada_order.go +++ b/controllers/dada_order.go @@ -36,8 +36,7 @@ func (c *DadaDeliveryController) Msg() { func (c *DadaDeliveryController) Notify() { if c.Ctx.Input.Method() == http.MethodPost { obj, notifyResponse := api.DadaAPI.GetNotifyMsg(c.Ctx.Input.RequestBody) - globals.SugarLogger.Debugf("dada notify, obj:%s", utils.Format4Output(obj, false)) - if notifyResponse == nil { + if notifyResponse == nil && obj.MessageObj != nil { err := api.DadaAPI.ConfirmRidderCancel(obj.MessageObj.OrderID, obj.MessageObj.DadaOrderID, true) globals.SugarLogger.Debugf("dada notify, obj:%s, err:%v", utils.Format4Output(obj, false), err) }