|
@@ -24,7 +24,6 @@ public class OrderCancelService {
|
|
|
private final OrderService orderService;
|
|
private final OrderService orderService;
|
|
|
|
|
|
|
|
@Scheduled(fixedRate = 30000, initialDelay = 10000)
|
|
@Scheduled(fixedRate = 30000, initialDelay = 10000)
|
|
|
- @RedisLock(value = "order_batch_cancel", expire = 3, unit = TimeUnit.MINUTES)
|
|
|
|
|
public void batchCancel() {
|
|
public void batchCancel() {
|
|
|
List<Order> orders = orderRepo.findByStatusAndCreatedAtBeforeAndDelFalse(OrderStatus.NOT_PAID,
|
|
List<Order> orders = orderRepo.findByStatusAndCreatedAtBeforeAndDelFalse(OrderStatus.NOT_PAID,
|
|
|
LocalDateTime.now().minusSeconds(210));
|
|
LocalDateTime.now().minusSeconds(210));
|