From 44ba05502920b496689c0bafccb9d2e5c21a6cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 12 Aug 2020 10:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E8=BF=90=E5=8D=95=E9=85=8D=E9=80=81?= =?UTF-8?q?=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 8ce14f16e..993655a8a 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1548,9 +1548,22 @@ func UpdateWaybillDesiredFee(ctx *jxcontext.Context, vendorOrderID string, desir return err } if bill == nil { - return fmt.Errorf("未找到此订单对应的运单!orderID: %v", vendorOrderID) + waybill := &model.Waybill{ + VendorOrderID: order.VendorOrderID, + OrderVendorID: order.VendorID, + VendorWaybillID: "-1", + WaybillVendorID: -1, + Status: model.WaybillStatusDelivered, + WaybillCreatedAt: time.Now(), + StatusTime: time.Now(), + WaybillFinishedAt: utils.DefaultTimeValue, + DeliveryFlag: model.OrderDeliveryFlagMaskScheduleDisabled, + DesiredFee: int64(desiredFee), + } + dao.CreateEntity(db, waybill) + } else { + bill.DesiredFee = int64(desiredFee) + _, err = dao.UpdateEntity(db, bill, "DesiredFee") } - bill.DesiredFee = int64(desiredFee) - _, err = dao.UpdateEntity(db, bill, "DesiredFee") return err }