Преглед на файлове

Merge branch 'dev' of xiongzhu/raex_back into master

xubinhui преди 2 години
родител
ревизия
19fa459616
променени са 1 файла, в които са добавени 2 реда и са изтрити 42 реда
  1. 2 42
      src/main/java/com/izouma/nineth/service/RiceService.java

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

@@ -798,40 +798,12 @@ public class RiceService {
 
     //@Scheduled(cron = "0 * * * * ?")
     @Scheduled(cron = "0 0 0 * * ?")
-    public void resetExchangeCount() {
+    public void resetRice() {
         List<Rice> riceList = riceRepo.findAll();
         for (Rice rice : riceList) {
             rice.setExchangeCount(0);
-        }
-        riceRepo.saveAll(riceList);
-    }
-
-
-    @Scheduled(cron = "0 0 0 * * ?")
-    public void resetInviteCount() {
-        List<Rice> riceList = riceRepo.findAll();
-        for (Rice rice : riceList) {
             rice.setInviteCount(0);
-        }
-        riceRepo.saveAll(riceList);
-    }
-
-
-
-    @Scheduled(cron = "0 0 0 * * ?")
-    public void resetHelpCount() {
-        List<Rice> riceList = riceRepo.findAll();
-        for (Rice rice : riceList) {
             rice.setHelpCount(0L);
-        }
-        riceRepo.saveAll(riceList);
-    }
-
-    //@Scheduled(cron = "0 0 0 * * ?")
-    @Scheduled(cron = "0 * * * * ?")
-    public void resetEarnPointsEveryDay() {
-        List<Rice> riceList = riceRepo.findAll();
-        for (Rice rice : riceList) {
             rice.setEarnPointsEveryDay(0L);
         }
         riceRepo.saveAll(riceList);
@@ -839,19 +811,7 @@ public class RiceService {
 
 
     //@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 * * * * ?")
+    @Scheduled(cron = "30 23 * * * ?")
     public void resetTestI() {
         List<Rice> riceList = riceRepo.findAll();
         for (Rice rice : riceList) {