...
|
...
|
@@ -418,31 +418,19 @@ class Mail { |
|
|
}
|
|
|
|
|
|
// 插入数据库
|
|
|
try {
|
|
|
// 主题太长了就截取掉
|
|
|
$data['subject'] = mb_substr($data['subject'],0,3500);
|
|
|
$id = $db->insert(listsSql::$table,$data);
|
|
|
try {
|
|
|
$id = $db->throw()->insert(listsSql::$table,$data);
|
|
|
}catch (\Throwable $e){
|
|
|
// 插入失败,尝试更新
|
|
|
if(!$id){
|
|
|
$db->update(listsSql::$table,$data,dbWhere([
|
|
|
'email_id'=> $data['email_id'],
|
|
|
'folder_id' => $data['folder_id'],
|
|
|
'uid' => $data['uid']
|
|
|
]));
|
|
|
}
|
|
|
// if($id){
|
|
|
// 同步body内容
|
|
|
// redis()->rPush('sync_email_body', [
|
|
|
// 'lists_id' => $id,
|
|
|
// 'email_id' => $email_id,
|
|
|
// 'folder_id' => $folder_id,
|
|
|
// 'folder' => $folder,
|
|
|
// 'uid' => $data['uid'],
|
|
|
// ]);
|
|
|
// }
|
|
|
}catch (\Throwable $e){
|
|
|
|
|
|
}
|
|
|
|
|
|
$results[$key] = [];
|
|
|
}
|
...
|
...
|
|