作者 邓超

xxx

... ... @@ -114,30 +114,30 @@ class Mail {
$folder['parseFolder'] = explode('/',$folder['parseFolder'])[1];
}
if(!$db->count(folderSql::has(['uuid'=>$uuid]))){
try {
$folder_name = '';
// 已发送
if(in_array('Send',$folder['check'])){
$folder_name = folderAlias('Send');
}
// 草稿
elseif(in_array('Drafts',$folder['check'])){
$folder_name = folderAlias('Drafts');
}
// 垃圾
elseif(in_array('Junk',$folder['check'])){
$folder_name = folderAlias('Junk');
}
// 回收站
elseif(in_array('Trash',$folder['check'])){
$folder_name = folderAlias('Trash');
}
if(!$folder_name){
$folder_name = folderAlias($folder['parseFolder']);
}
try {
$folder_name = '';
// 已发送
if(in_array('Send',$folder['check'])){
$folder_name = folderAlias('Send');
}
// 草稿
elseif(in_array('Drafts',$folder['check'])){
$folder_name = folderAlias('Drafts');
}
// 垃圾
elseif(in_array('Junk',$folder['check'])){
$folder_name = folderAlias('Junk');
}
// 回收站
elseif(in_array('Trash',$folder['check'])){
$folder_name = folderAlias('Trash');
}
if(!$folder_name){
$folder_name = folderAlias($folder['parseFolder']);
}
if(!$db->count(folderSql::has(['uuid'=>$uuid]))){
$db->insert(folderSql::$table,[
'email_id' => $email_id,
'folder' => folderAlias($folder_name),
... ... @@ -145,12 +145,21 @@ class Mail {
'uuid' => $uuid,
'pid' => $pid
],false);
}catch (\Throwable $e){
// 这里就不处理失败了
}else{
$db->update(folderSql::$table,[
'email_id' => $email_id,
'folder' => folderAlias($folder_name),
'origin_folder' => $folder['folder'],
'uuid' => $uuid,
'pid' => $pid
],dbWhere(['email_id' => $email_id,'uuid' => $uuid]),false);
}
}catch (\Throwable $e){
// 这里就不处理失败了
}
}
// $db->commit();
... ...