This commit is contained in:
suyl
2021-05-21 09:43:32 +08:00
parent d639dd788d
commit e04494342f

View File

@@ -250,7 +250,11 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])),
}
if sku.VendorSkuID == "" {
sku.VendorSkuID = product["app_food_code"].(string)
if !strings.Contains(product["app_food_code"].(string), "mtcode") {
sku.VendorSkuID = product["app_food_code"].(string)
} else {
sku.VendorSkuID = product["mt_sku_id"].(string)
}
}
if sku.Weight == 0 {
sku.Weight = 222 // 如果名字里找不到缺省给半斤左右的一个特别值