1
This commit is contained in:
@@ -84,9 +84,15 @@ func (c *OrderManager) OnOrderNew(order *model.GoodsOrder, orderStatus *model.Or
|
||||
isDuplicated, err = c.SaveOrder(order, false, db)
|
||||
}
|
||||
}
|
||||
if order.VendorID == 0 {
|
||||
globals.SugarLogger.Debugf("=========isDuplicated :=%v", isDuplicated)
|
||||
}
|
||||
if err == nil {
|
||||
dao.Commit(db, txDB)
|
||||
if !isDuplicated {
|
||||
if order.VendorID == 0 {
|
||||
globals.SugarLogger.Debugf("=========order94 :=%s", utils.Format4Output(order, false))
|
||||
}
|
||||
err = scheduler.CurrentScheduler.OnOrderNew(order, false, false)
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -84,6 +84,7 @@ func (c *PurchaseHandler) updateOrderFinancialInfo(a *jdapi.API, orderID string)
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) onOrderMsg(a *jdapi.API, msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
|
||||
globals.SugarLogger.Debugf("==========onOrderMsg := %s", utils.Format4Output(msg, false))
|
||||
// a := getAPI(vendorOrgCode)
|
||||
if afsMsgMap[msg.MsgURL] {
|
||||
retVal = c.OnAfsOrderMsg(a, msg)
|
||||
@@ -102,6 +103,8 @@ func (c *PurchaseHandler) onOrderMsg(a *jdapi.API, msg *jdapi.CallbackOrderMsg)
|
||||
} else {
|
||||
// 新订单事件,与订单状态有点冲突
|
||||
if jdapi.StatusIDNewOrder == msg.StatusID {
|
||||
globals.SugarLogger.Debugf("==========onOrderMsg := %s", utils.Format4Output(msg, false))
|
||||
globals.SugarLogger.Debugf("==========status := %s", utils.Format4Output(status, false))
|
||||
retVal = c.onOrderNew(a, msg, status)
|
||||
} else if jdapi.OrderStatusAdjust == msg.StatusID {
|
||||
retVal = c.onOrderAdjust(a, msg, status)
|
||||
|
||||
Reference in New Issue
Block a user