“xubinhui 3 years ago
parent
commit
09eb99b0ab
1 changed files with 22 additions and 22 deletions
  1. 22 22
      src/main/java/com/izouma/nineth/service/RiceService.java

+ 22 - 22
src/main/java/com/izouma/nineth/service/RiceService.java

@@ -833,28 +833,28 @@ public class RiceService {
         riceRepo.saveAll(riceList);
     }
 
-//
-//    //@Scheduled(cron = "0 0 0 * * ?")
-//    @Scheduled(cron = "0 * * * * ?")
-//    public void resetTestL() {
-//        List<Rice> riceList = riceRepo.findAll();
-//        for (Rice rice : riceList) {
-//            rice.setTestL(0L);
-//        }
-//        riceRepo.saveAll(riceList);
-//    }
-//
-//
-//
-//    //@Scheduled(cron = "0 0 0 * * ?")
-//    @Scheduled(cron = "0 * * * * ?")
-//    public void resetTestI() {
-//        List<Rice> riceList = riceRepo.findAll();
-//        for (Rice rice : riceList) {
-//            rice.setTestI(0);
-//        }
-//        riceRepo.saveAll(riceList);
-//    }
+
+    //@Scheduled(cron = "0 0 0 * * ?")
+    @Scheduled(cron = "0 * * * * ?")
+    public void resetTestL() {
+        List<Rice> riceList = riceRepo.findAll();
+        for (Rice rice : riceList) {
+            rice.setTestL(0L);
+        }
+        riceRepo.saveAll(riceList);
+    }
+
+
+
+    //@Scheduled(cron = "0 0 0 * * ?")
+    @Scheduled(cron = "0 * * * * ?")
+    public void resetTestI() {
+        List<Rice> riceList = riceRepo.findAll();
+        for (Rice rice : riceList) {
+            rice.setTestI(0);
+        }
+        riceRepo.saveAll(riceList);
+    }
 
 
 }