Browse Source

版本更换

anderx 4 years ago
parent
commit
0899953404
1 changed files with 4 additions and 14 deletions
  1. 4 14
      src/main/java/com/goafanti/common/task/UserFollowTask.java

+ 4 - 14
src/main/java/com/goafanti/common/task/UserFollowTask.java

@@ -37,7 +37,7 @@ public class UserFollowTask {
      *
      */
 
-//    @Scheduled(cron = "0 0 5 1 * ?")
+    @Scheduled(cron = "0 0 5 1 * ?")
     @RequestMapping(value = "/open/userFollowStatistics", method = RequestMethod.GET)
     public void 	userFollowStatistics() throws InterruptedException {
         //获取上月1号到本月1号的外出
@@ -81,7 +81,7 @@ public class UserFollowTask {
 
     public Calendar getNowDate(){
         Calendar now=Calendar.getInstance();
-        now.set(2021,9,1);
+        now.set(2021,10,1);
         now.set(Calendar.HOUR_OF_DAY, 0);
         now.clear(Calendar.MINUTE);
         now.clear(Calendar.SECOND);
@@ -90,7 +90,7 @@ public class UserFollowTask {
     }
     public String getYearMonth(){
         Calendar now=Calendar.getInstance();
-        now.set(2021,9,1);
+        now.set(2021,10,1);
         int y=now.get(Calendar.YEAR);
         int m=now.get(Calendar.MONTH);
         if(m<1){
@@ -100,15 +100,5 @@ public class UserFollowTask {
         return y+"-"+m;
     }
 
-    public static void main(String[] args) {
-        Calendar now=Calendar.getInstance();
-        now.set(2021,0,1);
-        int y=now.get(Calendar.YEAR);
-        int m=now.get(Calendar.MONTH);
-        if(m<1){
-            m=12;
-            y--;
-        }
-        System.out.println(y+"-"+m);
-    }
+
 }