ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TCouponServiceImpl.java
@@ -34,6 +34,13 @@ StringBuilder couponIds = new StringBuilder(); for (TCoupon tCoupon : list) { couponIds.append(tCoupon.getId()).append(","); // 如果优惠券库存为0 那么将优惠券状态改为下架 不启用 if (tCoupon.getInventoryQuantity()==0){ tCoupon.setStatus(2); this.baseMapper.updateById(tCoupon); } } if (!list.isEmpty()){ if (StringUtils.hasLength(couponIds)){