- 调用SelfDeliverDelivering要传骑手或店主手机号
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)
|
s.cancelOtherWaybills(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
||||||
if !s.IsOrderPlatformWaybill(bill) {
|
if !s.IsOrderPlatformWaybill(bill) {
|
||||||
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore {
|
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore {
|
||||||
s.SelfDeliverDelivering(savedOrderInfo.order, "")
|
s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile)
|
||||||
} else {
|
} else {
|
||||||
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, 2, 10*time.Second)
|
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, 2, 10*time.Second)
|
||||||
}
|
}
|
||||||
} else if s.IsSpecialOrderPlatformWaybill(bill) {
|
} 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 {
|
} else if !s.isBillCandidate(order, bill) && bill.WaybillVendorID != order.VendorID {
|
||||||
// 发生这种情况的原因就是两个接单事件几乎同时到达(来不及取消),也算正常
|
// 发生这种情况的原因就是两个接单事件几乎同时到达(来不及取消),也算正常
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"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/partner/delivery"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
|
"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 true { //order.DeliveryFlag&model.OrderDeliveryFlagMaskPurcahseDisabled == 0 {
|
||||||
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore {
|
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore {
|
||||||
if order.Status <= model.OrderStatusFinishedPickup {
|
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 {
|
} else {
|
||||||
if order.Status <= model.OrderStatusFinishedPickup {
|
if order.Status <= model.OrderStatusFinishedPickup {
|
||||||
|
|||||||
Reference in New Issue
Block a user