- all call CallFuncLogError add order info
- callLegacyMsgHandler, callNewMsgHandler and generateLegacyJxOrder config - call legacy lefted msg handler in new process(elm urge order and bad comment on jd)
This commit is contained in:
@@ -27,15 +27,19 @@ func (c *MTPSOrderController) URLMapping() {
|
||||
func (c *MTPSOrderController) Status() {
|
||||
obj, callbackResponse := api.MtpsAPI.GetOrderCallbackMsg(c.Ctx.Request)
|
||||
if callbackResponse == nil {
|
||||
if globals.CallLegacy {
|
||||
if globals.CallLegacyMsgHandler {
|
||||
cc := &controller.OrderController{}
|
||||
callbackResponse = cc.OrderStatusChanged(obj)
|
||||
}
|
||||
if globals.CallNew {
|
||||
utils.CallFuncAsync(func() {
|
||||
cc2 := &mtps.WaybillController{}
|
||||
cc2.OnWaybillMsg(obj)
|
||||
})
|
||||
if globals.CallNewMsgHandler {
|
||||
cc2 := &mtps.WaybillController{}
|
||||
if globals.CallLegacyMsgHandler {
|
||||
utils.CallFuncAsync(func() {
|
||||
cc2.OnWaybillMsg(obj)
|
||||
})
|
||||
} else {
|
||||
callbackResponse = cc2.OnWaybillMsg(obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
c.Data["json"] = callbackResponse
|
||||
@@ -50,15 +54,19 @@ func (c *MTPSOrderController) Status() {
|
||||
func (c *MTPSOrderController) Except() {
|
||||
obj, callbackResponse := api.MtpsAPI.GetOrderExceptionCallbackMsg(c.Ctx.Request)
|
||||
if callbackResponse == nil {
|
||||
if globals.CallLegacy {
|
||||
if globals.CallLegacyMsgHandler {
|
||||
cc := &controller.OrderController{}
|
||||
callbackResponse = cc.OrderException(obj)
|
||||
}
|
||||
if globals.CallNew {
|
||||
utils.CallFuncAsync(func() {
|
||||
cc2 := &mtps.WaybillController{}
|
||||
cc2.OnWaybillExcept(obj)
|
||||
})
|
||||
if globals.CallNewMsgHandler {
|
||||
cc2 := &mtps.WaybillController{}
|
||||
if globals.CallLegacyMsgHandler {
|
||||
utils.CallFuncAsync(func() {
|
||||
cc2.OnWaybillExcept(obj)
|
||||
})
|
||||
} else {
|
||||
callbackResponse = cc2.OnWaybillExcept(obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
c.Data["json"] = callbackResponse
|
||||
|
||||
Reference in New Issue
Block a user