作者 邓超

v2 调整

... ... @@ -135,6 +135,26 @@ class Home extends Base {
// 通过时间来搜索uid
$uids = $mail->client->search(['SINCE'=>date('d-M-Y',$udate)],true);
if ($uids){
// 已有的uid
$useuids = db()->all(
sprintf(
"select `uid` from `%s` where `email_id` = %d and `folder_id` = %d and `uid` in (%s)",
listsSql::$table,
$email['id'],
$folder['id'],
implode(',',$uids)
)
);
$useuids = $useuids ? array_column($useuids,'uid') : [];
if($useuids){
// 删除多余的
foreach ($uids as $k=>$uid){
if(in_array($uid,$useuids)){
unset($uids[$k]);
}
}
}
// 进行同步
$mail->syncUidEmail(
... ... @@ -147,6 +167,8 @@ class Home extends Base {
db()
);
}
}
}
... ...