|
@@ -546,6 +546,24 @@ class Home extends Base { |
|
@@ -546,6 +546,24 @@ class Home extends Base { |
546
|
$emails = $this->getEmails();
|
546
|
$emails = $this->getEmails();
|
547
|
|
547
|
|
548
|
$mail_ids = app()->request('mail_ids');
|
548
|
$mail_ids = app()->request('mail_ids');
|
|
|
549
|
+
|
|
|
550
|
+ // 全部标记
|
|
|
551
|
+ if(!$mail_ids){
|
|
|
552
|
+ $folder = app()->request('folder','收件箱');
|
|
|
553
|
+ // 查询 当前的 文件夹 如果有选中文件夹 就 查询出 选中文件夹的id
|
|
|
554
|
+ $fids = db()->all(folderSql::all(array_column($emails,'id'),'`id`,`folder`'));
|
|
|
555
|
+ foreach ($fids as $fk=>$fid){
|
|
|
556
|
+ if($fid['folder'] != $folder){
|
|
|
557
|
+ unset($fids[$fk]);
|
|
|
558
|
+ }
|
|
|
559
|
+ }
|
|
|
560
|
+ // 查询要标记的 邮件id
|
|
|
561
|
+ $mail_ids = db()->all(listsSql::all(dbWhere(['folder_id'=>array_column($fids,'id'),'seen'=>0]),'`id`'));
|
|
|
562
|
+
|
|
|
563
|
+ $mail_ids = array_column($mail_ids,'id');
|
|
|
564
|
+ }
|
|
|
565
|
+
|
|
|
566
|
+
|
549
|
if(!($mail_ids && is_array($mail_ids))){
|
567
|
if(!($mail_ids && is_array($mail_ids))){
|
550
|
app()->e('param_request_error');
|
568
|
app()->e('param_request_error');
|
551
|
}
|
569
|
}
|