Commit 653c7074 by 杨树贤

兼容报错

parent e5fdc63d
Showing with 7 additions and 4 deletions
......@@ -60,10 +60,13 @@ func (sc *CustomPrice) transformIEdgeLadderPrice(sku model.LySku) (ladderPriceLi
*/
if len(sku.CustomPriceList) != 0 {
for _, customPrice := range sku.CustomPriceList {
//只取第一个元素价格就行
ladderPrice := customPrice.LadderPrice[0]
ladderPrice.PriceName = customPrice.PriceName
ladderPriceList = append(ladderPriceList, ladderPrice)
if len(customPrice.LadderPrice)>0 {
//只取第一个元素价格就行
ladderPrice := customPrice.LadderPrice[0]
ladderPrice.PriceName = customPrice.PriceName
ladderPriceList = append(ladderPriceList, ladderPrice)
}
}
}
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