From 51925245a00dfe4df3010b9d32207a5a4e9e7e51 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 25 Mar 2019 22:36:14 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E7=BE=8E=E5=9B=A2=E5=A4=96=E5=8D=96?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=EF=BC=8C=E4=B8=8D=E8=AE=BE=E7=BD=AEStoreID?= =?UTF-8?q?=E4=B8=BAapp=5Fpoi=5Fcode=EF=BC=88=E5=9B=A0=E4=B8=BA=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E6=98=AF=E6=8A=8Aapp=5Fpoi=5Fcode=E5=BD=93=E6=88=90Ve?= =?UTF-8?q?ndorStoreID=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/mtwm/order.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/business/partner/purchase/mtwm/order.go b/business/partner/purchase/mtwm/order.go index 35032c763..5085fdc1e 100644 --- a/business/partner/purchase/mtwm/order.go +++ b/business/partner/purchase/mtwm/order.go @@ -64,12 +64,17 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo result := orderData vendorOrderID := utils.Int64ToStr(utils.MustInterface2Int64(result["order_id"])) deliveryTime := utils.Interface2Int64WithDefault(result["delivery_time"], 0) + // 因为美团外卖不能自动设置商家门店号,且只能通过商家门店号来访问门店, + // 为了在后台设置简单一致,把app_poi_code直接当成平台门店号使用(即在后台设置时,平台门店号与商家门店号一样) + // 订单中wm_poi_id实际来平台门店号,app_poi_code为商家门店号,这样一来,这两个就相同了 order = &model.GoodsOrder{ VendorOrderID: vendorOrderID, // VendorOrderID2: utils.Int64ToStr(utils.MustInterface2Int64(result["wm_order_id_view"])), - VendorID: model.VendorIDMTWM, - VendorStoreID: result["app_poi_code"].(string), - StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(result["app_poi_code"]), 0)), + VendorID: model.VendorIDMTWM, + VendorStoreID: result["app_poi_code"].(string), + StoreID: 0, + // VendorStoreID: utils.Int64ToStr(utils.MustInterface2Int64(result["wm_poi_id"])), + // StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(result["app_poi_code"]), 0)), StoreName: result["wm_poi_name"].(string), ConsigneeName: result["recipient_name"].(string), ConsigneeMobile: result["recipient_phone"].(string),