作者 邓超

优化

... ... @@ -841,8 +841,8 @@ class Home extends Base {
// 查询要标记的 邮件id
$sql = listsSql::all(dbWhere(['folder_id'=>array_column($fids,'id'),'seen'=>0]),'`id`');
$mail_ids = db()->all($sql);
$mail_ids2 = db()->all(str_replace('from `lists` where','from `lists_hot` where',$sql));
$mail_ids = array_merge($mail_ids,$mail_ids2);
// $mail_ids2 = db()->all(str_replace('from `lists` where','from `lists_hot` where',$sql));
// $mail_ids = array_merge($mail_ids,$mail_ids2);
$mail_ids = array_column($mail_ids,'id');
}
... ... @@ -866,8 +866,8 @@ class Home extends Base {
$sql = listsSql::all(dbWhere(['id'=>$mail_ids,'email_id'=>array_column($emails,'id')]),'`id`,`uid`,`email_id`,`folder_id`');
$data = db()->all($sql);
$data2 = db()->all(str_replace('from `lists` where','from `lists_hot` where',$sql));
$data = array_merge($data,$data2);
// $data2 = db()->all(str_replace('from `lists` where','from `lists_hot` where',$sql));
// $data = array_merge($data,$data2);
if($data){
// 查询邮箱
$emails = array_column($emails,null,'id');
... ...