...
|
...
|
@@ -273,7 +273,7 @@ public class ChannelSkuCompareServiceImpl implements IChannelSkuCompareService, |
|
|
bo.setHighRate(csc.getHighRate());
|
|
|
BigDecimal channelLowPrice = csc.getChannelPrice().multiply(BigDecimal.valueOf(1).subtract(csc.getLowRate()));
|
|
|
BigDecimal channelHighPrice = csc.getChannelPrice().multiply(BigDecimal.valueOf(1).add(csc.getHighRate()));
|
|
|
bo.setChannelPriceRange(getFormatPrice(channelLowPrice) + "~" + getFormatPrice(channelHighPrice));
|
|
|
bo.setChannelPriceRange(getIntFormatPrice(channelLowPrice) + "~" + getIntFormatPrice(channelHighPrice));
|
|
|
bo.setUfoCurrentPrice(getFormatPrice(storageMinPriceMap.get(csc.getSku())));
|
|
|
BigDecimal ufoMinPrice = null == productMap.get(csc.getProductId()) ? null : productMap.get(csc.getProductId()).getMinPrice();
|
|
|
bo.setUfoMinPrice(getFormatPrice(ufoMinPrice));
|
...
|
...
|
@@ -281,7 +281,7 @@ public class ChannelSkuCompareServiceImpl implements IChannelSkuCompareService, |
|
|
BigDecimal suggestLowPrice = null == storageMap.get(csc.getSku()) ? null : storageMap.get(csc.getSku()).getSuggestLowPrice();
|
|
|
BigDecimal suggestHighPrice = null == storageMap.get(csc.getSku()) ? null : storageMap.get(csc.getSku()).getSuggestHighPrice();
|
|
|
if(null != suggestLowPrice && null != suggestHighPrice) {
|
|
|
bo.setSuggestPriceRange(getFormatPrice(suggestLowPrice) + "~" + getFormatPrice(suggestHighPrice));
|
|
|
bo.setSuggestPriceRange(getIntFormatPrice(suggestLowPrice) + "~" + getIntFormatPrice(suggestHighPrice));
|
|
|
}
|
|
|
bo.setStatus(csc.getStatus());
|
|
|
bo.setStatusStr(bo.getStatus().intValue()==CHANNEL_SKU_COMPARE_NORMAL ? "正常" : "异常");
|
...
|
...
|
@@ -303,6 +303,13 @@ public class ChannelSkuCompareServiceImpl implements IChannelSkuCompareService, |
|
|
return String.format("%.2f", price.doubleValue());
|
|
|
}
|
|
|
|
|
|
private static String getIntFormatPrice(BigDecimal price) {
|
|
|
if(null == price) {
|
|
|
return "-";
|
|
|
}
|
|
|
return String.format("%d", price.intValue());
|
|
|
}
|
|
|
|
|
|
private boolean checkAndBuildParam(ChannelSkuCompareReq req) {
|
|
|
if(StringUtils.isNotEmpty(req.getProductName())) {
|
|
|
List<Product> productList = productMapper.selectByProductName(req.getProductName());
|
...
|
...
|
|