From e2a8b6582473326790b65371c1eb63fe7e66971a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 4 Sep 2020 16:44:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E=E5=94=AE?= =?UTF-8?q?=E5=90=8E=E5=8D=95=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 94dccb518..98677272b 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1415,6 +1415,9 @@ func MergeJdsOrders(ctx *jxcontext.Context, vendorOrderIDs []string) (vendorOrde order.ShopPrice = shopPrice order.TotalShopMoney = totalShop order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(orders[0].VendorOrderID2)*10000) + utils.Int2Str(time.Now().Second()) + if len(order.VendorOrderID) < 18 { + order.VendorOrderID = order.VendorOrderID + "0" + } order.VendorOrderID2 = strings.Join(orderIDs, ",") order.Status = model.OrderStatusNew setJdsOrderSeq(order) @@ -1594,8 +1597,10 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) if len(order.VendorOrderID2) > 18 { order.VendorOrderID2 = order.VendorOrderID2[0:12] } - order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*100000) + utils.Int2Str(time.Now().Second()) - order.VendorOrderID = order.VendorOrderID[0:18] + order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*10000) + utils.Int2Str(time.Now().Second()) + if len(order.VendorOrderID) < 18 { + order.VendorOrderID = order.VendorOrderID + "0" + } } for _, sku := range skus { sku.VendorOrderID = order.VendorOrderID