- vfoodId

This commit is contained in:
gazebo
2018-09-28 12:25:24 +08:00
parent 6244dbec2f
commit d1c91c83ce

View File

@@ -171,11 +171,13 @@ func (c *PurchaseHandler) GetOrder(orderID string) (order *model.GoodsOrder, err
VendorID: model.VendorIDELM, VendorID: model.VendorIDELM,
Count: int(utils.MustInterface2Int64(product["quantity"])), Count: int(utils.MustInterface2Int64(product["quantity"])),
SkuID: int(utils.Str2Int64WithDefault(utils.Interface2String(product["extendCode"]), 0)), SkuID: int(utils.Str2Int64WithDefault(utils.Interface2String(product["extendCode"]), 0)),
//VendorSkuID: utils.Int64ToStr(utils.MustInterface2Int64(product["vfoodId"])), VendorSkuID: utils.Int64ToStr(utils.Interface2Int64WithDefault(product["vfoodId"], 0)),
VendorSkuID: utils.Int64ToStr(utils.MustInterface2Int64(product["id"])), // 2018-09-28日饿了么迁移到饿百后这个字段发生了变化 SkuName: product["name"].(string),
SkuName: product["name"].(string), SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])),
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])), Weight: int(math.Round(utils.Interface2FloatWithDefault(product["weight"], 0.0))),
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.Skus = append(order.Skus, sku)
order.SkuCount++ order.SkuCount++