正在显示
1 个修改的文件
包含
22 行增加
和
0 行删除
@@ -135,6 +135,26 @@ class Home extends Base { | @@ -135,6 +135,26 @@ class Home extends Base { | ||
135 | 135 | ||
136 | // 通过时间来搜索uid | 136 | // 通过时间来搜索uid |
137 | $uids = $mail->client->search(['SINCE'=>date('d-M-Y',$udate)],true); | 137 | $uids = $mail->client->search(['SINCE'=>date('d-M-Y',$udate)],true); |
138 | + if ($uids){ | ||
139 | + // 已有的uid | ||
140 | + $useuids = db()->all( | ||
141 | + sprintf( | ||
142 | + "select `uid` from `%s` where `email_id` = %d and `folder_id` = %d and `uid` in (%s)", | ||
143 | + listsSql::$table, | ||
144 | + $email['id'], | ||
145 | + $folder['id'], | ||
146 | + implode(',',$uids) | ||
147 | + ) | ||
148 | + ); | ||
149 | + $useuids = $useuids ? array_column($useuids,'uid') : []; | ||
150 | + if($useuids){ | ||
151 | + // 删除多余的 | ||
152 | + foreach ($uids as $k=>$uid){ | ||
153 | + if(in_array($uid,$useuids)){ | ||
154 | + unset($uids[$k]); | ||
155 | + } | ||
156 | + } | ||
157 | + } | ||
138 | 158 | ||
139 | // 进行同步 | 159 | // 进行同步 |
140 | $mail->syncUidEmail( | 160 | $mail->syncUidEmail( |
@@ -147,6 +167,8 @@ class Home extends Base { | @@ -147,6 +167,8 @@ class Home extends Base { | ||
147 | db() | 167 | db() |
148 | ); | 168 | ); |
149 | } | 169 | } |
170 | + | ||
171 | + } | ||
150 | } | 172 | } |
151 | 173 | ||
152 | 174 |
-
请 注册 或 登录 后发表评论