- change elm order vendorSkuID from vfoodId to id

This commit is contained in:
gazebo
2018-09-28 12:15:22 +08:00
parent dd2eb743cb
commit 6244dbec2f

View File

@@ -171,10 +171,11 @@ 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"])),
SkuName: product["name"].(string),
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])),
Weight: int(math.Round(utils.Interface2FloatWithDefault(product["weight"], 0.0))),
//VendorSkuID: utils.Int64ToStr(utils.MustInterface2Int64(product["vfoodId"])),
VendorSkuID: utils.Int64ToStr(utils.MustInterface2Int64(product["id"])), // 2018-09-28日饿了么迁移到饿百后这个字段发生了变化
SkuName: product["name"].(string),
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])),
Weight: int(math.Round(utils.Interface2FloatWithDefault(product["weight"], 0.0))),
}
order.Skus = append(order.Skus, sku)
order.SkuCount++