Commit 0eed2fa74c1254d88e2d052473b8ae431fe38c7b
1 parent
3accf807
没问题
Showing
1 changed file
with
1 additions
and
1 deletions
yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java
| ... | ... | @@ -76,7 +76,7 @@ public interface CouponTemplateMapper extends BaseMapperX<CouponTemplateDO> { |
| 76 | 76 | .in(CouponTemplateDO::getTakeType, canTakeTypes) // 2. 领取方式一致 |
| 77 | 77 | .and(ww -> ww.gt(CouponTemplateDO::getValidEndTime, LocalDateTime.now()) // 3.1 未过期 |
| 78 | 78 | .or().eq(CouponTemplateDO::getValidityType, CouponTemplateValidityTypeEnum.TERM.getType())) // 3.2 领取之后 |
| 79 | - .apply(" (take_count < total_count OR total_count = -1)"); // 4. 剩余数量大于 0,或者无限领取 | |
| 79 | + .apply(" (take_count < total_count OR total_count = " + CouponTemplateDO.TOTAL_COUNT_MAX + ")"); // 4. 剩余数量大于 0,或者无限领取 | |
| 80 | 80 | } |
| 81 | 81 | return canTakeConsumer; |
| 82 | 82 | } | ... | ... |