From 8b48244257eaa19bfd8a761b3d2309cea25a8aaa Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 16 七月 2025 16:20:48 +0800 Subject: [PATCH] 政务云数据上传bug修改 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TCouponServiceImpl.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TCouponServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TCouponServiceImpl.java index 9b29460..c08b27b 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TCouponServiceImpl.java +++ b/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)){ -- Gitblit v1.7.1