Showing
1 changed file
with
7 additions
and
4 deletions
@@ -273,15 +273,18 @@ public class ChannelSkuCompareServiceImpl implements IChannelSkuCompareService, | @@ -273,15 +273,18 @@ public class ChannelSkuCompareServiceImpl implements IChannelSkuCompareService, | ||
273 | BigDecimal ufoMinPrice = null == productMap.get(csc.getProductId()) ? null : productMap.get(csc.getProductId()).getMinPrice(); | 273 | BigDecimal ufoMinPrice = null == productMap.get(csc.getProductId()) ? null : productMap.get(csc.getProductId()).getMinPrice(); |
274 | bo.setUfoMinPrice(getFormatPrice(ufoMinPrice)); | 274 | bo.setUfoMinPrice(getFormatPrice(ufoMinPrice)); |
275 | //毒当前价低于UFO价格红线则为异常,那么显示上回的建议价 | 275 | //毒当前价低于UFO价格红线则为异常,那么显示上回的建议价 |
276 | - BigDecimal suggestLowPrice = storageMap.get(csc.getSku()).getSuggestLowPrice(); | ||
277 | - BigDecimal suggestHighPrice = storageMap.get(csc.getSku()).getSuggestHighPrice(); | 276 | + BigDecimal suggestLowPrice = null == storageMap.get(csc.getSku()) ? null : storageMap.get(csc.getSku()).getSuggestLowPrice(); |
277 | + BigDecimal suggestHighPrice = null == storageMap.get(csc.getSku()) ? null : storageMap.get(csc.getSku()).getSuggestHighPrice(); | ||
278 | if(null != suggestLowPrice && null != suggestHighPrice) { | 278 | if(null != suggestLowPrice && null != suggestHighPrice) { |
279 | bo.setSuggestPriceRange(getFormatPrice(suggestLowPrice) + "~" + getFormatPrice(suggestHighPrice)); | 279 | bo.setSuggestPriceRange(getFormatPrice(suggestLowPrice) + "~" + getFormatPrice(suggestHighPrice)); |
280 | } | 280 | } |
281 | bo.setStatus(csc.getStatus()); | 281 | bo.setStatus(csc.getStatus()); |
282 | bo.setStatusStr(bo.getStatus().intValue()==CHANNEL_SKU_COMPARE_NORMAL ? "正常" : "异常"); | 282 | bo.setStatusStr(bo.getStatus().intValue()==CHANNEL_SKU_COMPARE_NORMAL ? "正常" : "异常"); |
283 | - String imageUrl = goodsIdImageMap.get(storageMap.get(csc.getSku()).getGoodsId()); | ||
284 | - bo.setImageUrl(ImagesHelper.getImageAbsoluteUrl(imageUrl, ImagesConstant.BUCKET_GOODS_IMG)); | 283 | + if(null != storageMap.get(csc.getSku())) { |
284 | + String imageUrl = goodsIdImageMap.get(storageMap.get(csc.getSku()).getGoodsId()); | ||
285 | + bo.setImageUrl(ImagesHelper.getImageAbsoluteUrl(imageUrl, ImagesConstant.BUCKET_GOODS_IMG)); | ||
286 | + } | ||
287 | + | ||
285 | boList.add(bo); | 288 | boList.add(bo); |
286 | } | 289 | } |
287 | 290 |
-
Please register or login to post a comment