From 889f05214c819eeda91d0d00d1d4f57f5117d746 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, 9 Jul 2020 16:00:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=BD=AC=E7=A7=BB=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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 89c3637b5..6efdb0ed0 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1283,7 +1283,13 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) return "", fmt.Errorf("未查询到该门店对应的平台信息!门店:[%v]", order.StoreID) } if len(order.VendorOrderID) > 12 { - suffix := utils.Str2Int(order.VendorOrderID[12:len(order.VendorOrderID)]) + var goodsOrders []*model.GoodsOrder + sql := ` + SELECT * FROM goods_order WHERE vendor_order_id2 = ? ORDER BY vendor_order_id DESC + ` + sqlParams := []interface{}{order.VendorOrderID2} + err = dao.GetRows(db, &goodsOrders, sql, sqlParams) + suffix := utils.Str2Int(goodsOrders[0].VendorOrderID[12:len(goodsOrders[0].VendorOrderID)]) suffix++ order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(order.VendorOrderID2)*100000) + utils.Int2Str(suffix) }