diff --git a/business/partner/purchase/elm/order.go b/business/partner/purchase/elm/order.go index 807a19512..979edaa60 100644 --- a/business/partner/purchase/elm/order.go +++ b/business/partner/purchase/elm/order.go @@ -171,11 +171,14 @@ func (c *PurchaseHandler) GetOrder(orderID string) (order *model.GoodsOrder, err VendorID: model.VendorIDELM, Count: int(utils.MustInterface2Int64(product["quantity"])), SkuID: int(utils.Str2Int64WithDefault(utils.Interface2String(product["extendCode"]), 0)), - VendorSkuID: utils.Int64ToStr(utils.MustInterface2Int64(product["vfoodId"])), + VendorSkuID: utils.Int64ToStr(utils.Interface2Int64WithDefault(product["vfoodId"], 0)), SkuName: product["name"].(string), SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])), Weight: int(math.Round(utils.Interface2FloatWithDefault(product["weight"], 0.0))), } + if sku.VendorSkuID == "0" { + sku.VendorSkuID = utils.Int64ToStr(utils.MustInterface2Int64(product["id"])) // 2018-09-28日,饿了么迁移到饿百后,这个字段发生了变化 + } order.Skus = append(order.Skus, sku) order.SkuCount++ order.GoodsCount += sku.Count