- 京东订单单品无优惠时,优惠信息保持为空

This commit is contained in:
gazebo
2019-06-14 11:16:29 +08:00
parent cf8fa813f8
commit 47189b82d2
2 changed files with 3 additions and 3 deletions

View File

@@ -162,8 +162,9 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
Weight: jxutils.FloatWeight2Int(float32(utils.MustInterface2Float64(product["skuWeight"]))),
VendorPrice: utils.MustInterface2Int64(product["skuStorePrice"]),
SalePrice: utils.MustInterface2Int64(product["skuJdPrice"]),
PromotionType: int(utils.MustInterface2Int64(product["promotionType"])),
StoreSubName: utils.Int64ToStr(utils.MustInterface2Int64(product["promotionType"])),
}
if jdPromotionType := int(utils.MustInterface2Int64(product["promotionType"])); jdPromotionType != jdapi.PromotionTypeNormal {
sku.StoreSubName = utils.Int2Str(jdPromotionType)
}
if skuCostumeProperty, ok := product["skuCostumeProperty"]; ok {
sku.SkuName += skuCostumeProperty.(string)