1
This commit is contained in:
@@ -162,7 +162,7 @@ func (s *DefScheduler) CreateWaybillOnProviders4SavedOrder(ctx *jxcontext.Contex
|
|||||||
// 检查订单是否在配送状态
|
// 检查订单是否在配送状态
|
||||||
waybills, err := dao.GetWaybills(dao.GetDB(), order.VendorOrderID, nil)
|
waybills, err := dao.GetWaybills(dao.GetDB(), order.VendorOrderID, nil)
|
||||||
for _, v := range waybills {
|
for _, v := range waybills {
|
||||||
if v.Status >= model.OrderStatusDelivering {
|
if v.Status >= model.OrderStatusDelivering && v.Status != model.OrderStatusCanceled && v.Status != model.OrderStatusFinished {
|
||||||
err = fmt.Errorf("订单已经在配送中,无法创建运单,有疑问请联系管理员")
|
err = fmt.Errorf("订单已经在配送中,无法创建运单,有疑问请联系管理员")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *m
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
globals.SugarLogger.Debugf("===========msg := %s", utils.Format4Output(msg, false))
|
||||||
store, _ := dao.GetStoreDetail(dao.GetDB(), goodsOrder.JxStoreID, goodsOrder.VendorID, goodsOrder.VendorOrgCode)
|
store, _ := dao.GetStoreDetail(dao.GetDB(), goodsOrder.JxStoreID, goodsOrder.VendorID, goodsOrder.VendorOrgCode)
|
||||||
switch msg.Status {
|
switch msg.Status {
|
||||||
case mtpsapi.OrderStatusWaitingForSchedule:
|
case mtpsapi.OrderStatusWaitingForSchedule:
|
||||||
|
|||||||
Reference in New Issue
Block a user