From 7f05b771f4352ef4608881bda6bf8e2cc6d7c4b7 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 10 Sep 2019 17:51:36 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E8=AE=BE=E7=BD=AE=E7=BE=8E=E5=9B=A2?= =?UTF-8?q?=E5=A4=96=E5=8D=96=E8=AE=A2=E5=8D=95=E7=9A=84DeliveryType?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= 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, 11 insertions(+) diff --git a/business/partner/purchase/mtwm/order.go b/business/partner/purchase/mtwm/order.go index c5d78e98e..358b9871a 100644 --- a/business/partner/purchase/mtwm/order.go +++ b/business/partner/purchase/mtwm/order.go @@ -122,6 +122,17 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo OriginalData: string(utils.MustMarshal(result)), ActualPayPrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(result["total"])), } + pickType := int(utils.Interface2Int64WithDefault(result["pick_type"], 0)) + if pickType == mtwmapi.OrderPickTypeSelf { + order.DeliveryType = model.OrderDeliveryTypeSelfTake + } else { + logisticsCode := utils.Interface2String(result["logistics_code"]) + if logisticsCode == mtwmapi.PeiSongTypeSelf { + order.DeliveryType = model.OrderDeliveryTypeStoreSelf + } else { + order.DeliveryType = model.OrderDeliveryTypePlatform + } + } openUID := utils.Interface2Int64WithDefault(result["openUid"], 0) if openUID > 0 { order.VendorUserID = utils.Int64ToStr(openUID)