- 接收门店状态消息,本地同步状态,京东暂时无效

This commit is contained in:
gazebo
2019-04-12 16:22:22 +08:00
parent ca8d0b362b
commit 77c5a16c08
14 changed files with 233 additions and 53 deletions

View File

@@ -8,10 +8,7 @@ import (
)
func OnOrderCallbackMsg(msg *mtwmapi.CallbackMsg) (response *mtwmapi.CallbackResponse) {
if msg.Cmd == mtwmapi.MsgTypePrivateNumberDowngrade {
response = mtwmapi.SuccessResponse
} else {
orderID := GetOrderIDFromMsg(msg)
if orderID := GetOrderIDFromMsg(msg); orderID != "" {
jxutils.CallMsgHandler(func() {
switch msg.Cmd {
case mtwmapi.MsgTypeWaybillStatus:
@@ -20,11 +17,13 @@ func OnOrderCallbackMsg(msg *mtwmapi.CallbackMsg) (response *mtwmapi.CallbackRes
response = curPurchaseHandler.onOrderMsg(msg)
}
}, jxutils.ComposeUniversalOrderID(orderID, model.VendorIDMTWM))
if msg.Cmd == mtwmapi.MsgTypeOrderRefund || msg.Cmd == mtwmapi.MsgTypeOrderPartialRefund {
utils.CallFuncAsync(func() {
OnFinancialMsg(msg)
})
}
}
if msg.Cmd == mtwmapi.MsgTypeOrderRefund || msg.Cmd == mtwmapi.MsgTypeOrderPartialRefund {
utils.CallFuncAsync(func() {
OnFinancialMsg(msg)
})
} else if msg.Cmd == mtwmapi.MsgTypeStoreStatusChanged {
response = curPurchaseHandler.onStoreStatusChanged(msg)
}
return response
}