From 8e60975ba99dec42dbf65de4a016fff1c37e72bb Mon Sep 17 00:00:00 2001 From: wuchunlei Date: Mon, 7 Jul 2025 14:38:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9vip=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E5=92=8C=E6=B4=BB=E5=8A=A8=E4=BB=B7=E6=A0=BC=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E6=97=B6=E5=BE=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/modules/book/controller/BuyOrderController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, "库存不足");