Commit 005d64aae68374674c928dc575578a1fd9ae479f
Merge remote-tracking branch 'origin/master-jdk17' into master-jdk17
Showing
1 changed file
with
4 additions
and
0 deletions
yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java
| ... | ... | @@ -166,6 +166,10 @@ public class CouponServiceImpl implements CouponService { |
| 166 | 166 | public void invalidateCouponsByAdmin(List<Long> giveCouponIds, Long userId) { |
| 167 | 167 | // 循环收回 |
| 168 | 168 | for (Long couponId : giveCouponIds) { |
| 169 | + // couponId为空或0则跳过 | |
| 170 | + if (null == couponId || couponId <= 0) { | |
| 171 | + continue; | |
| 172 | + } | |
| 169 | 173 | try { |
| 170 | 174 | getSelf().invalidateCoupon(couponId, userId); |
| 171 | 175 | } catch (Exception e) { | ... | ... |