Authored by Lixiaodi

价格展示

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