- 调整京东售后单处理流程

This commit is contained in:
gazebo
2019-05-10 14:24:15 +08:00
parent 5af086fe25
commit fbea78dc53
3 changed files with 22 additions and 34 deletions

View File

@@ -9,14 +9,8 @@ import (
func OnOrderMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
if curPurchaseHandler != nil {
if msg.MsgURL == jdapi.CallbackMsgAfterSaleBillStatus {
utils.CallFuncAsync(func() {
retVal = OnAfsOrderMsg(msg)
})
} else {
if retVal = curPurchaseHandler.OnOrderMsg(msg); retVal == nil {
retVal = jdapi.Err2CallbackResponse(errors.New("Internal Error"), "")
}
if retVal = curPurchaseHandler.OnOrderMsg(msg); retVal == nil {
retVal = jdapi.Err2CallbackResponse(errors.New("Internal Error"), "")
}
}
return retVal
@@ -31,15 +25,6 @@ func OnWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackR
return retVal
}
func OnAfsOrderMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
if curPurchaseHandler != nil {
if retVal = curPurchaseHandler.OnAfsOrderMsg(msg); retVal == nil {
retVal = jdapi.Err2CallbackResponse(errors.New("Internal Error"), "")
}
}
return retVal
}
func OnStoreMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
if curPurchaseHandler != nil {
retVal = curPurchaseHandler.onStoreMsg(msg)