...
|
...
|
@@ -245,15 +245,27 @@ class SyncMail { |
|
|
$p=1;
|
|
|
while (1){
|
|
|
if($this->isStop) return;
|
|
|
$uids = $msg->forPage($p)->getUids();
|
|
|
if($uids){
|
|
|
$p++;
|
|
|
|
|
|
$lists = $msg->forPage($p)->get()->all();
|
|
|
// 没有数据就跳出
|
|
|
if(!$lists){
|
|
|
break;
|
|
|
foreach ($uids as $k=>$uid){
|
|
|
if($this->db->cache(86400*30,false)->value(listsSql::first(dbWhere(['email_id'=>$this->emailId(),'folder_id'=>$folder_id,'uid'=>$uid]),'count(*) as c'))){
|
|
|
unset($uids[$k]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(!$uids) continue;
|
|
|
|
|
|
$lists = $msg->uid($uids)->get()->all();
|
|
|
// 没有数据就跳出
|
|
|
if($lists){
|
|
|
$this->saveMail($folder_id,$lists,$isBody);
|
|
|
}
|
|
|
}else{
|
|
|
$p++;
|
|
|
$this->saveMail($folder_id,$lists,$isBody);
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|