Merge remote-tracking branch 'origin/mark' into lcw
This commit is contained in:
@@ -351,12 +351,12 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
||||
s.cancelOtherWaybills(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
||||
if !s.IsOrderPlatformWaybill(bill) {
|
||||
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore {
|
||||
s.SelfDeliverDelivering(savedOrderInfo.order, "")
|
||||
s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile)
|
||||
} else {
|
||||
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, 2, 10*time.Second)
|
||||
}
|
||||
} else if s.IsSpecialOrderPlatformWaybill(bill) {
|
||||
s.SelfDeliverDelivering(savedOrderInfo.order, "")
|
||||
s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile)
|
||||
}
|
||||
} else if !s.isBillCandidate(order, bill) && bill.WaybillVendorID != order.VendorID {
|
||||
// 发生这种情况的原因就是两个接单事件几乎同时到达(来不及取消),也算正常
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
|
||||
@@ -31,7 +32,12 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
|
||||
if true { //order.DeliveryFlag&model.OrderDeliveryFlagMaskPurcahseDisabled == 0 {
|
||||
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore {
|
||||
if order.Status <= model.OrderStatusFinishedPickup {
|
||||
err = s.SelfDeliverDelivering(order, userName)
|
||||
storeDetail, err2 := dao.GetStoreDetail(dao.GetDB(), order.StoreID, order.VendorID)
|
||||
phone := userName
|
||||
if err = err2; err == nil {
|
||||
phone = storeDetail.Tel1
|
||||
}
|
||||
err = s.SelfDeliverDelivering(order, phone)
|
||||
}
|
||||
} else {
|
||||
if order.Status <= model.OrderStatusFinishedPickup {
|
||||
|
||||
Reference in New Issue
Block a user