Authored by Lixiaodi

价格展示

... ... @@ -1362,12 +1362,10 @@ public class ProductServiceImpl implements ProductService {
// 价格
resp.setPrice(sp.getPrice().toString());
BigDecimal inStockLeastPrice = storagePriceMapper.selectInStockLeastPriceByProductId(productId);
if (inStockLeastPrice != null) {
if (inStockLeastPrice != null && inStockLeastPrice.compareTo(sp.getPrice()) > 0) {
resp.setNewProductPrice(inStockLeastPrice.toString());
if (inStockLeastPrice.compareTo(sp.getPrice()) > 0) {
resp.setSavePrice(inStockLeastPrice.subtract(sp.getPrice()).toString());
}
}
resp.setSizeName(size.getSizeName() + "码");
resp.setProductName(product.getProductName());
... ...