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)