- ebaiapi KeySkuID and KeyCustomSkuID
This commit is contained in:
@@ -117,7 +117,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
VendorID: model.VendorIDEBAI,
|
||||
Count: int(utils.MustInterface2Int64(product["product_amount"])),
|
||||
SkuID: int(utils.Str2Int64WithDefault(utils.Interface2String(product["custom_sku_id"]), 0)),
|
||||
SkuID: int(utils.Str2Int64WithDefault(utils.Interface2String(product[ebaiapi.KeyCustomSkuID]), 0)),
|
||||
VendorSkuID: utils.Interface2String(product["baidu_product_id"]),
|
||||
SkuName: skuName,
|
||||
Weight: jxutils.FormatSkuWeight(specQuality, specUnit), // 订单信息里没有重量,只有名字里尝试找
|
||||
|
||||
@@ -330,7 +330,7 @@ func (p *PurchaseHandler) DeleteRemoteSkus(ctx *jxcontext.Context, parentTask ta
|
||||
if err = err2; err == nil {
|
||||
vendorSkuIDs = make([]string, len(result))
|
||||
for k, v := range result {
|
||||
vendorSkuIDs[k] = utils.Interface2String(v["sku_id"])
|
||||
vendorSkuIDs[k] = utils.Interface2String(v[ebaiapi.KeySkuID])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user