From 4f10721d59e3931d2482e1c86af840cb36044211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 4 Jun 2020 16:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=BD=AC=E7=A7=BB=E8=A7=84?= =?UTF-8?q?=E5=88=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index bb2c14e79..3dfd1e7b0 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1119,8 +1119,8 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) if err != nil || order == nil { return "", fmt.Errorf("未查询到该订单!订单号:[%v]", vendorOrderID) } - if order.Status == model.OrderStatusFinished { - return "", fmt.Errorf("暂不支持已完成的订单进行转移!") + if order.Status >= model.OrderStatusDelivering { + return "", fmt.Errorf("暂不支持此状态的订单进行转移!") } if order.VendorID != model.VendorIDJDShop { return "", fmt.Errorf("暂不支持非京狗的订单进行转移!") @@ -1130,11 +1130,11 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) return "", fmt.Errorf("未查询到该订单商品!订单号:[%v]", vendorOrderID) } //将订单和运单取消 - if order.Status == model.OrderStatusDelivering { - waybills, err := dao.GetWaybills(db, vendorOrderID) - if err != nil || len(waybills) == 0 { - return "", fmt.Errorf("未查询到该订单对应的运单信息!订单号:[%v]", vendorOrderID) - } + waybills, err := dao.GetWaybills(db, vendorOrderID) + if err != nil { + return "", err + } + if len(waybills) > 0 { for _, v := range waybills { if v.Status != model.WaybillStatusCanceled { waybill = v