...
|
...
|
@@ -546,6 +546,24 @@ class Home extends Base { |
|
|
$emails = $this->getEmails();
|
|
|
|
|
|
$mail_ids = app()->request('mail_ids');
|
|
|
|
|
|
// 全部标记
|
|
|
if(!$mail_ids){
|
|
|
$folder = app()->request('folder','收件箱');
|
|
|
// 查询 当前的 文件夹 如果有选中文件夹 就 查询出 选中文件夹的id
|
|
|
$fids = db()->all(folderSql::all(array_column($emails,'id'),'`id`,`folder`'));
|
|
|
foreach ($fids as $fk=>$fid){
|
|
|
if($fid['folder'] != $folder){
|
|
|
unset($fids[$fk]);
|
|
|
}
|
|
|
}
|
|
|
// 查询要标记的 邮件id
|
|
|
$mail_ids = db()->all(listsSql::all(dbWhere(['folder_id'=>array_column($fids,'id'),'seen'=>0]),'`id`'));
|
|
|
|
|
|
$mail_ids = array_column($mail_ids,'id');
|
|
|
}
|
|
|
|
|
|
|
|
|
if(!($mail_ids && is_array($mail_ids))){
|
|
|
app()->e('param_request_error');
|
|
|
}
|
...
|
...
|
|