- fk
This commit is contained in:
@@ -840,14 +840,17 @@ func (s *DefScheduler) mergeOrderStatusConfig(savedOrderInfo *WatchOrderInfo, st
|
||||
}
|
||||
}
|
||||
} else { // 有最后拣货时间,反推
|
||||
aHead := time2AutoPickupAhead + second2AutoPickupGap*time.Second
|
||||
timeout := order.PickDeadline.Sub(time.Now()) - (time2AutoPickupAhead + second2AutoPickupGap*time.Second)
|
||||
realSecond2AutoPickupGap := second2AutoPickupGap
|
||||
if realSecond2AutoPickupGap > int(aHead/time.Second) {
|
||||
realSecond2AutoPickupGap = int(aHead / time.Second)
|
||||
if realSecond2AutoPickupGap > int(timeout/time.Second) {
|
||||
realSecond2AutoPickupGap = int(timeout / time.Second)
|
||||
if realSecond2AutoPickupGap < 0 {
|
||||
realSecond2AutoPickupGap = 0
|
||||
}
|
||||
}
|
||||
vendorActionParams = &partner.StatusActionParams{
|
||||
TimerType: partner.TimerTypeBaseNow,
|
||||
Timeout: order.PickDeadline.Sub(time.Now()) - aHead,
|
||||
Timeout: timeout,
|
||||
TimeoutGap: realSecond2AutoPickupGap,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user