定时任务 问题2
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user