- 京东订单单品无优惠时,优惠信息保持为空
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -198,7 +198,6 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
if /*skuActTypeMap[v.Type] == 1 && */ strings.Index(v.Remark, skuName) >= 0 && sku.Count == v.Count {
|
||||
ignoreSkuMap[sku.SkuID] = 1
|
||||
sku.SalePrice -= jxutils.StandardPrice2Int(v.MtCharge + v.PoiCharge)
|
||||
sku.PromotionType = v.Type
|
||||
sku.StoreSubName = utils.Int2Str(v.Type)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user