Authored by mali

详情页bug

... ... @@ -601,27 +601,31 @@ public class ProductServiceImpl implements ProductService{
for (Storage storage : storageList) {
StoragePrice storagePrice = storagePriceMap.get(storage.getId());
//高于建议价,不展示skup
if(null != storagePrice && null != storage.getSuggestHighPrice() && storagePrice.getPrice().compareTo(storage.getSuggestHighPrice()) > 0) {
continue;
}
GoodsSize goodsSize = new GoodsSize();
goodsSize.setId(storage.getId());
goodsSize.setSizeId(storage.getSizeId());
Size size = sizeMap.get(storage.getSizeId());
goodsSize.setSizeName(size == null ? "" : size.getSizeName());
goodsSize.setOrderBy(size == null ? 0 : size.getOrderBy());
goodsSize.setLeastPrice(storagePrice == null ? null : storagePrice.getPrice());
goodsSize.setStatus(storagePrice == null ? null : storagePrice.getStatus());
goodsSize.setStorageNum(storagePrice == null ? 0 : storage.getStorageNum());
goodsSize.setSkup(storagePrice == null ? 0 : storagePrice.getSkup());
goodsSize.setSellLeastPrice(sellMinPrice);
goodsSize.setMaxPrice(maxPrice);
goodsSize.setSuggestLowPrice(storage.getSuggestLowPrice());
goodsSize.setSuggestHighPrice(storage.getSuggestHighPrice());
goodSizeList.add(goodsSize);
//高于建议价,不展示skup
if(null != storagePrice && null != storage.getSuggestHighPrice() && storagePrice.getPrice().compareTo(storage.getSuggestHighPrice()) > 0) {
goodsSize.setStorageNum(0);
goodsSize.setSkup(0);
continue;
}
goodsSize.setLeastPrice(storagePrice == null ? null : storagePrice.getPrice());
goodsSize.setStatus(storagePrice == null ? null : storagePrice.getStatus());
goodsSize.setStorageNum(storagePrice == null ? 0 : storage.getStorageNum());
goodsSize.setSkup(storagePrice == null ? 0 : storagePrice.getSkup());
}
}
}
... ...