diff --git a/src/main/java/com/peanut/modules/book/controller/BuyOrderController.java b/src/main/java/com/peanut/modules/book/controller/BuyOrderController.java index c92e0427..81e0c5e1 100644 --- a/src/main/java/com/peanut/modules/book/controller/BuyOrderController.java +++ b/src/main/java/com/peanut/modules/book/controller/BuyOrderController.java @@ -382,7 +382,9 @@ public class BuyOrderController { BigDecimal price = getRealPrice(product); if (buyOrder.getVipDiscountAmount()!=null&&buyOrder.getVipDiscountAmount().compareTo(new BigDecimal(0))>0 &&userVipService.isVip()&&product.getIsVipPrice()==1){ - price = shopProductService.getVipPrice(product); + if (shopProductService.getVipPrice(product).compareTo(BigDecimal.ZERO)>0){ + price = shopProductService.getVipPrice(product); + } } if (!handleStock(buyOrderProduct, product)) { return R.error(500, "库存不足");