定时任务 问题2
This commit is contained in:
parent
6f0c25c16c
commit
f01ccf65ce
|
|
@ -49,7 +49,7 @@ public class CouponTask {
|
||||||
LocalDateTime endTime = mkShopCouponRecord.getUseEndTime();
|
LocalDateTime endTime = mkShopCouponRecord.getUseEndTime();
|
||||||
if (endTime != null) {
|
if (endTime != null) {
|
||||||
Duration duration = Duration.between(now, endTime);
|
Duration duration = Duration.between(now, endTime);
|
||||||
long seconds = duration.getSeconds() % 60;
|
long seconds = duration.getSeconds();
|
||||||
redisService.set(RedisCst.classKeyExpired.EXPIRED_COUPON + mkShopCouponRecord.getId(), mkShopCouponRecord.getId(), seconds);
|
redisService.set(RedisCst.classKeyExpired.EXPIRED_COUPON + mkShopCouponRecord.getId(), mkShopCouponRecord.getId(), seconds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue