Browse Source

add to local

stanley-king 7 years ago
parent
commit
e986f82010
1 changed files with 22 additions and 0 deletions
  1. 22 0
      crontab/control/command.php

+ 22 - 0
crontab/control/command.php

@@ -84,4 +84,26 @@ class commandControl extends BaseCronControl
             }
         }
     }
+
+    public function pass_followOp()
+    {
+        $mod_member = Model('member');
+        $i = 0;
+        while (true)
+        {
+            $start = $i * 1000;
+            $items = $mod_member->field('member_id')->order('member_id asc')->limit("{$start},1000")->select();
+            if(empty($items)) {
+                return;
+            }
+            $i++;
+
+            foreach ($items as $item)
+            {
+                $user = intval($item['member_id']);
+                if($user <= 0) continue;
+                relation_helper::onLogin($user);
+            }
+        }
+    }
 }