正在显示
1 个修改的文件
包含
12 行增加
和
3 行删除
@@ -114,7 +114,7 @@ class Mail { | @@ -114,7 +114,7 @@ class Mail { | ||
114 | $folder['parseFolder'] = explode('/',$folder['parseFolder'])[1]; | 114 | $folder['parseFolder'] = explode('/',$folder['parseFolder'])[1]; |
115 | } | 115 | } |
116 | 116 | ||
117 | - if(!$db->count(folderSql::has(['uuid'=>$uuid]))){ | 117 | + |
118 | try { | 118 | try { |
119 | $folder_name = ''; | 119 | $folder_name = ''; |
120 | // 已发送 | 120 | // 已发送 |
@@ -137,7 +137,7 @@ class Mail { | @@ -137,7 +137,7 @@ class Mail { | ||
137 | if(!$folder_name){ | 137 | if(!$folder_name){ |
138 | $folder_name = folderAlias($folder['parseFolder']); | 138 | $folder_name = folderAlias($folder['parseFolder']); |
139 | } | 139 | } |
140 | - | 140 | + if(!$db->count(folderSql::has(['uuid'=>$uuid]))){ |
141 | $db->insert(folderSql::$table,[ | 141 | $db->insert(folderSql::$table,[ |
142 | 'email_id' => $email_id, | 142 | 'email_id' => $email_id, |
143 | 'folder' => folderAlias($folder_name), | 143 | 'folder' => folderAlias($folder_name), |
@@ -145,10 +145,19 @@ class Mail { | @@ -145,10 +145,19 @@ class Mail { | ||
145 | 'uuid' => $uuid, | 145 | 'uuid' => $uuid, |
146 | 'pid' => $pid | 146 | 'pid' => $pid |
147 | ],false); | 147 | ],false); |
148 | + }else{ | ||
149 | + $db->update(folderSql::$table,[ | ||
150 | + 'email_id' => $email_id, | ||
151 | + 'folder' => folderAlias($folder_name), | ||
152 | + 'origin_folder' => $folder['folder'], | ||
153 | + 'uuid' => $uuid, | ||
154 | + 'pid' => $pid | ||
155 | + ],dbWhere(['email_id' => $email_id,'uuid' => $uuid]),false); | ||
156 | + } | ||
148 | }catch (\Throwable $e){ | 157 | }catch (\Throwable $e){ |
149 | // 这里就不处理失败了 | 158 | // 这里就不处理失败了 |
150 | } | 159 | } |
151 | - } | 160 | + |
152 | 161 | ||
153 | 162 | ||
154 | } | 163 | } |
-
请 注册 或 登录 后发表评论