整理订单调整中对于DeliveryType相关的流程

This commit is contained in:
gazebo
2019-11-06 14:29:13 +08:00
parent dc7d712ff6
commit 208e836f40
6 changed files with 38 additions and 90 deletions

View File

@@ -33,7 +33,7 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
if err = s.isPossibleSwitch2SelfDelivery(order); err == nil {
err = s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, nil, partner.CancelWaybillReasonOther, partner.CancelWaybillReasonStrActive)
if err == nil {
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore {
if model.IsOrderDeliveryByStore(order) {
if order.Status < model.OrderStatusDelivering {
storeDetail, err2 := dao.GetStoreDetail(dao.GetDB(), order.StoreID, order.VendorID)
phone := userName
@@ -91,7 +91,7 @@ func (s *DefScheduler) canOrderCreateWaybillNormally(order *model.GoodsOrder) (e
}
func (s *DefScheduler) isPossibleSwitch2SelfDelivery(order *model.GoodsOrder) (err error) {
if scheduler.StoreDeliveryTypeByStore != s.GetStoreDeliveryType(order, nil) {
if model.IsOrderDeliveryByPlatform(order) {
if order.Status < model.OrderStatusFinishedPickup {
err = fmt.Errorf("拣货完成后才能转自配送")
} else if order.Status == model.OrderStatusFinishedPickup {