This commit is contained in:
邹宗楠
2024-04-17 18:18:04 +08:00
parent 3f4912b0b5
commit 55b24bb283

View File

@@ -419,6 +419,7 @@ func (s *DefScheduler) OnOrderNew(order *model.GoodsOrder, isPending bool, isAut
s.resetTimer(savedOrderInfo, nil, isPending)
if order.VendorID == 0 {
globals.SugarLogger.Debugf("=====print := %s", utils.Format4Output(order, false))
globals.SugarLogger.Debugf("=====isPending := %s", utils.Format4Output(isPending, false))
}
if !isPending && order.Status >= model.OrderStatusAccepted { // 有订单消息错序先收到接单消息再收到新订单消息导致接单TIMER不动作这里补一下
s.notifyNewOrder(order, isAuto)
@@ -1726,10 +1727,21 @@ func setFakeActualPayPrice(order *model.GoodsOrder) (newOrder *model.GoodsOrder)
}
func (s *DefScheduler) notifyNewOrder(order *model.GoodsOrder, isAuto bool) {
if order.VendorID == 0 {
globals.SugarLogger.Debugf("==order1 := %s", utils.Format4Output(order, false))
}
if order.Flag&model.OrderFlagMaskFake == 0 && order.VendorID != model.VendorIDEBAI {
utils.CallFuncAsync(func() {
// order = setFakeActualPayPrice(order)
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order, model.PrintTypeOrder, nil)
if order.VendorID == 0 {
globals.SugarLogger.Debugf("==order2 := %s", utils.Format4Output(order, false))
}
result, err := netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order, model.PrintTypeOrder, nil)
if order.VendorID == 0 {
globals.SugarLogger.Debugf("==result := %s", utils.Format4Output(result, false))
globals.SugarLogger.Debugf("==err := %v", err)
}
//目前暂且认为AdjustCount > 0 就是调整单
if order.AdjustCount > 0 {
weixinmsg.NotifyAdjustOrder(order)