Commit 653c7074 by 杨树贤

兼容报错

parent e5fdc63d
Showing with 3 additions and 0 deletions
...@@ -60,11 +60,14 @@ func (sc *CustomPrice) transformIEdgeLadderPrice(sku model.LySku) (ladderPriceLi ...@@ -60,11 +60,14 @@ func (sc *CustomPrice) transformIEdgeLadderPrice(sku model.LySku) (ladderPriceLi
*/ */
if len(sku.CustomPriceList) != 0 { if len(sku.CustomPriceList) != 0 {
for _, customPrice := range sku.CustomPriceList { for _, customPrice := range sku.CustomPriceList {
if len(customPrice.LadderPrice)>0 {
//只取第一个元素价格就行 //只取第一个元素价格就行
ladderPrice := customPrice.LadderPrice[0] ladderPrice := customPrice.LadderPrice[0]
ladderPrice.PriceName = customPrice.PriceName ladderPrice.PriceName = customPrice.PriceName
ladderPriceList = append(ladderPriceList, ladderPrice) ladderPriceList = append(ladderPriceList, ladderPrice)
} }
}
} }
return ladderPriceList return ladderPriceList
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment