作者 邓超

qq邮箱有tm毛病

@@ -49,6 +49,13 @@ class SyncMail { @@ -49,6 +49,13 @@ class SyncMail {
49 protected $search = null; 49 protected $search = null;
50 50
51 /** 51 /**
  52 + * 是否强制更新
  53 + * @var bool
  54 + */
  55 + protected $isForceUpdate = false;
  56 +
  57 +
  58 + /**
52 * SyncMail constructor. 59 * SyncMail constructor.
53 * @param int|string|array $email 60 * @param int|string|array $email
54 * @throws \Exception 61 * @throws \Exception
@@ -103,6 +110,14 @@ class SyncMail { @@ -103,6 +110,14 @@ class SyncMail {
103 } 110 }
104 111
105 /** 112 /**
  113 + * 强制更新本地数据
  114 + */
  115 + public function forceUpdate(): void
  116 + {
  117 + $this->isForceUpdate = true;
  118 + }
  119 +
  120 + /**
106 * 登录imap 121 * 登录imap
107 * @throws \Exception 122 * @throws \Exception
108 * @author:dc 123 * @author:dc
@@ -262,6 +277,10 @@ class SyncMail { @@ -262,6 +277,10 @@ class SyncMail {
262 * @time 2024/11/12 14:17 277 * @time 2024/11/12 14:17
263 */ 278 */
264 private function getFilterUid(array $uids, int $folder_id):array { 279 private function getFilterUid(array $uids, int $folder_id):array {
  280 + // 强制更新本地数据,不进行过滤
  281 + if($this->isForceUpdate){
  282 + return $uids;
  283 + }
265 foreach ($uids as $k=>$uid){ 284 foreach ($uids as $k=>$uid){
266 285
267 $num = redis()->get('h_'.$folder_id.'_'.$uid,function () use ($folder_id,$uid){ 286 $num = redis()->get('h_'.$folder_id.'_'.$uid,function () use ($folder_id,$uid){