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