소스 검색

add to local

stanley-king 7 년 전
부모
커밋
e986f82010
1개의 변경된 파일22개의 추가작업 그리고 0개의 파일을 삭제
  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);
+            }
+        }
+    }
 }