1
This commit is contained in:
@@ -383,6 +383,9 @@ func Init() {
|
||||
|
||||
// 以下是订单
|
||||
func (s *DefScheduler) OnOrderNew(order *model.GoodsOrder, isPending bool, isAuto bool) (err error) {
|
||||
if order.StoreID == 800245 {
|
||||
globals.SugarLogger.Debugf("=====print := %s", utils.Format4Output(order, false))
|
||||
}
|
||||
savedOrderInfo := s.loadSavedOrderFromMap(model.Order2Status(order), false)
|
||||
savedOrderInfo.SetOrder(order)
|
||||
if order.VendorID == model.VendorIDEBAI { //饿百订单待接单的时候就推所有东西
|
||||
@@ -411,7 +414,8 @@ func (s *DefScheduler) OnOrderNew(order *model.GoodsOrder, isPending bool, isAut
|
||||
}
|
||||
if order.Status >= model.OrderStatusNew {
|
||||
s.resetTimer(savedOrderInfo, nil, isPending)
|
||||
if !isPending && order.Status >= model.OrderStatusAccepted { // 有订单消息错序,先收到接单消息,再收到新订单消息,导致接单TIMER不动作,这里补一下
|
||||
if !isPending && order.Status >= model.OrderStatusNew { // 有订单消息错序,先收到接单消息,再收到新订单消息,导致接单TIMER不动作,这里补一下
|
||||
//if !isPending && order.Status >= model.OrderStatusAccepted { // 有订单消息错序,先收到接单消息,再收到新订单消息,导致接单TIMER不动作,这里补一下
|
||||
s.notifyNewOrder(order, isAuto)
|
||||
msghub.OnNewOrder(order)
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ package jd
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
func OnOrderMsg(msg *jdapi.CallbackOrderMsg, a *jdapi.API) (retVal *jdapi.CallbackResponse) {
|
||||
@@ -22,9 +20,7 @@ func OnWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackR
|
||||
|
||||
func OnStoreMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
|
||||
if CurPurchaseHandler != nil {
|
||||
globals.SugarLogger.Debugf("==========msg := %s", utils.Format4Output(msg, false))
|
||||
retVal = CurPurchaseHandler.OnStoreMsg(AppKey2OrgCode(msg.AppKey), msg)
|
||||
globals.SugarLogger.Debugf("==========retVal := %s", utils.Format4Output(retVal, false))
|
||||
}
|
||||
return retVal
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user