- debug
This commit is contained in:
@@ -801,6 +801,8 @@ func (s *DefScheduler) resetTimer(savedOrderInfo *WatchOrderInfo, bill *model.Wa
|
||||
})
|
||||
}
|
||||
globals.SugarLogger.Debugf("resetTimer, orderID:%s, statusType:%d, status:%d, timeout:%v", order.VendorOrderID, statusType, status, timeout)
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("resetTimer, orderID:%s, statusType:%d, status:%d, should not set timer", order.VendorOrderID, statusType, status)
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("resetTimer bypass2, orderID:%s statusType:%d status:%v, config:%s", order.VendorOrderID, statusType, status, utils.Format4Output(config, true))
|
||||
@@ -911,6 +913,7 @@ func (s *DefScheduler) mergeOrderStatusConfig(savedOrderInfo *WatchOrderInfo, st
|
||||
}
|
||||
|
||||
func (s *DefScheduler) handleAutoAcceptOrder(orderID string, vendorID int, userMobile string, jxStoreID int, db orm.Ormer, handler func(accepted bool) error) int {
|
||||
globals.SugarLogger.Debugf("handleAutoAcceptOrder order:%s, vendorID:%d", orderID, vendorID)
|
||||
handleType := 0
|
||||
if userMobile != "" {
|
||||
if db == nil {
|
||||
@@ -921,17 +924,17 @@ func (s *DefScheduler) handleAutoAcceptOrder(orderID string, vendorID int, userM
|
||||
}
|
||||
if err := db.Read(user, "Mobile"); err != nil {
|
||||
if err != orm.ErrNoRows {
|
||||
globals.SugarLogger.Errorf("read data error:%v, data:%v, vendorID:%d", err, user, vendorID)
|
||||
globals.SugarLogger.Errorf("handleAutoAcceptOrder orderID:%s, read data error:%v, data:%v, vendorID:%d", orderID, err, user, vendorID)
|
||||
}
|
||||
// 在访问数据库出错的情况下,也需要自动接单
|
||||
handleType = 1
|
||||
} else {
|
||||
// 强制拒单
|
||||
globals.SugarLogger.Infof("force reject order:%s, vendorID:%d", orderID, vendorID)
|
||||
globals.SugarLogger.Infof("handleAutoAcceptOrder force reject order:%s, vendorID:%d", orderID, vendorID)
|
||||
handleType = -1
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Infof("order:%s, vendorID:%d, mobile is empty, should accept order", orderID, vendorID)
|
||||
globals.SugarLogger.Infof("handleAutoAcceptOrder order:%s, vendorID:%d, mobile is empty, should accept order", orderID, vendorID)
|
||||
handleType = 1
|
||||
}
|
||||
if handleType == 1 {
|
||||
|
||||
Reference in New Issue
Block a user