This commit is contained in:
suyl
2021-09-13 09:09:17 +08:00
parent bbb3a27ca6
commit f07752806d
5 changed files with 86 additions and 12 deletions

View File

@@ -340,6 +340,9 @@ func Map2Order(orderData map[string]interface{}) (order *model.GoodsOrder) {
VendorPrice: utils.MustInterface2Int64(product["skuStorePrice"]),
SalePrice: utils.MustInterface2Int64(product["skuJdPrice"]),
}
if product["upcCode"] != nil && product["upcCode"].(string) != "" {
sku.Upc = product["upcCode"].(string)
}
if jdPromotionType := int(utils.MustInterface2Int64(product["promotionType"])); jdPromotionType != 0 && jdPromotionType != jdapi.PromotionTypeNormal {
sku.StoreSubName = utils.Int2Str(jdPromotionType)
}

View File

@@ -249,6 +249,9 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
VendorPrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])),
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])),
}
if product["upc"] != nil && product["upc"].(string) != "" {
sku.Upc = product["upc"].(string)
}
if sku.VendorSkuID == "" {
if !strings.Contains(product["app_food_code"].(string), "mtcode") {
sku.VendorSkuID = product["app_food_code"].(string)