...
|
...
|
@@ -418,32 +418,20 @@ class Mail { |
|
|
}
|
|
|
|
|
|
// 插入数据库
|
|
|
// 主题太长了就截取掉
|
|
|
$data['subject'] = mb_substr($data['subject'],0,3500);
|
|
|
try {
|
|
|
// 主题太长了就截取掉
|
|
|
$data['subject'] = mb_substr($data['subject'],0,3500);
|
|
|
$id = $db->insert(listsSql::$table,$data);
|
|
|
// 插入失败,尝试更新
|
|
|
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'],
|
|
|
// ]);
|
|
|
// }
|
|
|
$id = $db->throw()->insert(listsSql::$table,$data);
|
|
|
}catch (\Throwable $e){
|
|
|
|
|
|
// 插入失败,尝试更新
|
|
|
$db->update(listsSql::$table,$data,dbWhere([
|
|
|
'email_id'=> $data['email_id'],
|
|
|
'folder_id' => $data['folder_id'],
|
|
|
'uid' => $data['uid']
|
|
|
]));
|
|
|
}
|
|
|
|
|
|
|
|
|
$results[$key] = [];
|
|
|
}
|
|
|
}
|
...
|
...
|
|