xiongzhu il y a 4 ans
Parent
commit
c2a493af2c

+ 2 - 1
src/main/java/com/izouma/nineth/service/CollectionService.java

@@ -206,11 +206,12 @@ public class CollectionService {
                 .build());
     }
 
-    @Scheduled(fixedRate = 60000)
+    @Scheduled(fixedRate = 10000)
     public void scheduleOnShelf() {
         List<Collection> collections = collectionRepo.findByScheduleSaleTrueAndOnShelfFalseAndStartTimeBeforeAndDelFalse(LocalDateTime.now());
         for (Collection collection : collections) {
             collection.setOnShelf(true);
+            collection.setSalable(true);
         }
         collectionRepo.saveAll(collections);
     }