对齐 BOOT 与 CLOUD 的代码

This commit is contained in:
YunaiV
2024-01-19 22:13:55 +08:00
parent 023a7b14d8
commit 6a6e95fcb6
7 changed files with 5 additions and 15 deletions

View File

@ -70,7 +70,7 @@ public class CouponServiceImpl implements CouponService {
throw exception(COUPON_STATUS_NOT_UNUSED);
}
// 校验有效期;为避免定时器没跑,实际优惠劵已经过期
if (LocalDateTimeUtils.isBetween(coupon.getValidStartTime(), coupon.getValidEndTime())) {
if (!LocalDateTimeUtils.isBetween(coupon.getValidStartTime(), coupon.getValidEndTime())) {
throw exception(COUPON_VALID_TIME_NOT_NOW);
}
}