...
|
...
|
@@ -63,9 +63,20 @@ class HotMail { |
|
|
|
|
|
|
|
|
$maxId = $this->db->value("select `id` from `lists` order by `id` desc limit 1");
|
|
|
for ($i=0;$i<ceil($maxId/1000);$i++){
|
|
|
$this->run(range($i*1000,($i+1)*1000));
|
|
|
$id = 0;
|
|
|
while (1){
|
|
|
$ids = [];
|
|
|
for ($i=0;$i<1000;$i++){
|
|
|
$ids[] = $i+$id;
|
|
|
}
|
|
|
$id = end($ids);
|
|
|
|
|
|
$this->run($ids);
|
|
|
if($id>$maxId){
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
echo '已执行完成'.PHP_EOL;
|
|
|
}
|
...
|
...
|
@@ -74,7 +85,7 @@ class HotMail { |
|
|
private $folder = [];
|
|
|
|
|
|
private function run($id){
|
|
|
$list = $this->db->all(\Model\listsSql::first(dbWhere(['id'=>$id,'is_hots'=>0]),'`id`,`from`,`to`,`folder_id`'));
|
|
|
$list = $this->db->all(\Model\listsSql::all(dbWhere(['id'=>$id,'is_hots'=>0]),'`id`,`from`,`to`,`folder_id`'));
|
|
|
foreach ($list as $item){
|
|
|
if(empty($this->folder[$item['folder_id']])){
|
|
|
$this->folder[$item['folder_id']] = folderAlias($this->db->value(\Model\folderSql::first($item['folder_id'],'folder')));
|
...
|
...
|
|