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()){