Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -160,6 +160,7 @@ func (s *WatchOrderInfo) SetOrder(order *model.GoodsOrder) (retVal *model.GoodsO
|
|||||||
}
|
}
|
||||||
s.order = order
|
s.order = order
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("SetOrder s.order======%s ,retval====%s", utils.Format4Output(s.order, false), utils.Format4Output(retVal, false))
|
||||||
return retVal
|
return retVal
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1086,16 +1087,19 @@ func (s *DefScheduler) swtich2SelfDeliverWithRetry(savedOrderInfo *WatchOrderInf
|
|||||||
// 这个函数这样写的原因是适应一些消息错序
|
// 这个函数这样写的原因是适应一些消息错序
|
||||||
func (s *DefScheduler) loadSavedOrderFromMap(status *model.OrderStatus, isForceLoad bool) *WatchOrderInfo {
|
func (s *DefScheduler) loadSavedOrderFromMap(status *model.OrderStatus, isForceLoad bool) *WatchOrderInfo {
|
||||||
universalOrderID := jxutils.ComposeUniversalOrderID(status.RefVendorOrderID, status.RefVendorID) // 等于RefVendorOrderID
|
universalOrderID := jxutils.ComposeUniversalOrderID(status.RefVendorOrderID, status.RefVendorID) // 等于RefVendorOrderID
|
||||||
|
globals.SugarLogger.Debugf("status====%s,universalOrderID=========%s", utils.Format4Output(status, false), universalOrderID)
|
||||||
var realSavedInfo *WatchOrderInfo
|
var realSavedInfo *WatchOrderInfo
|
||||||
if savedInfo, ok := s.orderMap.Load(universalOrderID); ok {
|
if savedInfo, ok := s.orderMap.Load(universalOrderID); ok {
|
||||||
realSavedInfo = savedInfo.(*WatchOrderInfo)
|
realSavedInfo = savedInfo.(*WatchOrderInfo)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
realSavedInfo = NewWatchOrderInfo(nil)
|
realSavedInfo = NewWatchOrderInfo(nil)
|
||||||
s.orderMap.StoreWithTimeout(universalOrderID, realSavedInfo, orderMapStoreMaxTime)
|
s.orderMap.StoreWithTimeout(universalOrderID, realSavedInfo, orderMapStoreMaxTime)
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("loadSavedOrderFromMap realSavedInfo===========%s", utils.Format4Output(realSavedInfo, false))
|
globals.SugarLogger.Debugf("pre loadSavedOrderFromMap realSavedInfo===========%s", utils.Format4Output(realSavedInfo, false))
|
||||||
if isForceLoad {
|
if isForceLoad {
|
||||||
if order, err := partner.CurOrderManager.LoadOrder(status.RefVendorOrderID, status.RefVendorID); err == nil {
|
if order, err := partner.CurOrderManager.LoadOrder(status.RefVendorOrderID, status.RefVendorID); err == nil {
|
||||||
|
globals.SugarLogger.Debugf("isForceLoad order======%s", utils.Format4Output(order, false))
|
||||||
realSavedInfo.SetOrder(order)
|
realSavedInfo.SetOrder(order)
|
||||||
} else {
|
} else {
|
||||||
realSavedInfo.SetOrder(&model.GoodsOrder{
|
realSavedInfo.SetOrder(&model.GoodsOrder{
|
||||||
@@ -1106,8 +1110,8 @@ func (s *DefScheduler) loadSavedOrderFromMap(status *model.OrderStatus, isForceL
|
|||||||
OrderCreatedAt: status.StatusTime,
|
OrderCreatedAt: status.StatusTime,
|
||||||
WaybillVendorID: model.VendorIDUnknown,
|
WaybillVendorID: model.VendorIDUnknown,
|
||||||
})
|
})
|
||||||
|
globals.SugarLogger.Debugf("after loadSavedOrderFromMap realSavedInfo=========%s", utils.Format4Output(realSavedInfo, false))
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("loadSavedOrderFromMap realSavedInfo=========%s", utils.Format4Output(realSavedInfo, false))
|
|
||||||
}
|
}
|
||||||
return realSavedInfo
|
return realSavedInfo
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user