This commit is contained in:
苏尹岚
2021-04-01 13:50:19 +08:00
parent 51c282c62b
commit 721b9a7357
2 changed files with 5 additions and 0 deletions

View File

@@ -11,10 +11,13 @@ import (
func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse) {
globals.SugarLogger.Debugf("ebai OnCallbackMsg msg:%s", utils.Format4Output(msg, true))
if CurPurchaseHandler != nil {
globals.SugarLogger.Debugf("ebai OnCallbackMsg msg 1")
if orderID := GetOrderIDFromMsg(msg); orderID != "" {
globals.SugarLogger.Debugf("ebai OnCallbackMsg msg 2 ,%d", orderID)
jxutils.CallMsgHandler(func() {
switch msg.Cmd {
case ebaiapi.CmdOrderCreate, ebaiapi.CmdOrderStatus, ebaiapi.CmdOrderUserCancel, ebaiapi.CmdOrderPartRefund:
globals.SugarLogger.Debugf("ebai OnCallbackMsg msg 3 ,%s", msg.Cmd)
response = CurPurchaseHandler.onOrderMsg(msg)
case ebaiapi.CmdOrderDeliveryStatus:
response = CurPurchaseHandler.onWaybillMsg(msg)