From a015e7c916474bb51b33c228f690aa17f30c746c Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期六, 04 一月 2025 09:32:31 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java index 55f9cef..2802a73 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java @@ -522,6 +522,7 @@ sum = orderGoodList.stream().mapToInt(OrderGood::getNum).sum(); } vo.setPurchaseLimit((num + sum) > goods.getPurchaseLimit()); + vo.setPurchaseLimitNum(goods.getPurchaseLimit() - sum); } vo.setDistributionMode(goods.getDistributionMode()); vo.setEarnSpendingPoints(price.getEarnSpendingPoints()); @@ -609,7 +610,7 @@ String goodsName = ""; for (Integer goodsId : goodsIds) { Goods goods = goodsClient.getGoodsById(goodsId).getData(); - if(1 == goods.getAppointStore() && !collect.contains(goodsId)){ + if(goods.getType() == 1 && 1 == goods.getAppointStore() && !collect.contains(goodsId)){ goodsName = goods.getName(); break; } -- Gitblit v1.7.1