xuhy
2025-01-15 da1a5ead936791e9a9494067da7980f7e5144693
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -723,7 +723,7 @@
         num += num1;
         ShoppingCart shoppingCart = this.getById(id);
         //判断当前数量是否已经超出限购数量(需要计算已经购买的数量)
         Integer goodsSaleNum = orderService.getGoodsSaleNum(shoppingCart.getGoodsId(), type);
         Integer goodsSaleNum = orderService.getGoodsSaleNum(shoppingCart.getGoodsId(), type, userid);
         Goods goods = goodsClient.getGoodsById(shoppingCart.getGoodsId()).getData();
         if(1 == type){
            if(null != goods.getPurchaseLimit() && -1 != goods.getPurchaseLimit() && (goodsSaleNum + num1) > goods.getPurchaseLimit()){