dada notify msg
This commit is contained in:
@@ -38,15 +38,16 @@ func (c *DadaDeliveryController) Notify() {
|
||||
obj, notifyResponse := api.DadaAPI.GetNotifyMsg(c.Ctx.Input.RequestBody)
|
||||
if notifyResponse == nil && obj.MessageObj != nil {
|
||||
err := api.DadaAPI.ConfirmRidderCancel(obj.MessageObj.OrderID, obj.MessageObj.DadaOrderID, true)
|
||||
if err != nil {
|
||||
notifyResponse = dadaapi.FailedNotifyResponse
|
||||
}
|
||||
globals.SugarLogger.Debugf("dada notify, obj:%s, err:%v", utils.Format4Output(obj, false), err)
|
||||
}
|
||||
if notifyResponse == nil {
|
||||
notifyResponse = dadaapi.SuccessNotifyResponse
|
||||
} else {
|
||||
c.Data["json"] = notifyResponse
|
||||
c.ServeJSON()
|
||||
}
|
||||
globals.SugarLogger.Debugf("DadaDeliveryController.Notify:%s", utils.Format4Output(notifyResponse, false))
|
||||
c.Data["json"] = notifyResponse
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
c.Abort("404")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user