正在显示
1 个修改的文件
包含
13 行增加
和
3 行删除
@@ -810,8 +810,10 @@ class Home extends Base { | @@ -810,8 +810,10 @@ class Home extends Base { | ||
810 | } | 810 | } |
811 | if($fids){ | 811 | if($fids){ |
812 | // 查询要标记的 邮件id | 812 | // 查询要标记的 邮件id |
813 | - $mail_ids = db()->all(listsSql::all(dbWhere(['folder_id'=>array_column($fids,'id'),'seen'=>0]),'`id`')); | ||
814 | - | 813 | + $sql = listsSql::all(dbWhere(['folder_id'=>array_column($fids,'id'),'seen'=>0]),'`id`'); |
814 | + $mail_ids = db()->all($sql); | ||
815 | + $mail_ids2 = db()->all(str_replace('from `lists` where','from `lists_hot` where',$sql)); | ||
816 | + $mail_ids = array_merge($mail_ids,$mail_ids2); | ||
815 | $mail_ids = array_column($mail_ids,'id'); | 817 | $mail_ids = array_column($mail_ids,'id'); |
816 | } | 818 | } |
817 | 819 | ||
@@ -833,7 +835,10 @@ class Home extends Base { | @@ -833,7 +835,10 @@ class Home extends Base { | ||
833 | $fv = (int) app()->request($d); | 835 | $fv = (int) app()->request($d); |
834 | $fv = $fv ? 1 : 0; | 836 | $fv = $fv ? 1 : 0; |
835 | 837 | ||
836 | - $data = db()->all(listsSql::all(dbWhere(['id'=>$mail_ids,'email_id'=>array_column($emails,'id')]),'`id`,`uid`,`email_id`,`folder_id`')); | 838 | + $sql = listsSql::all(dbWhere(['id'=>$mail_ids,'email_id'=>array_column($emails,'id')]),'`id`,`uid`,`email_id`,`folder_id`'); |
839 | + $data = db()->all($sql); | ||
840 | + $data2 = db()->all(str_replace('from `lists` where','from `lists_hot` where',$sql)); | ||
841 | + $data = array_merge($data,$data2); | ||
837 | if($data){ | 842 | if($data){ |
838 | // 查询邮箱 | 843 | // 查询邮箱 |
839 | $emails = array_column($emails,null,'id'); | 844 | $emails = array_column($emails,null,'id'); |
@@ -887,6 +892,11 @@ class Home extends Base { | @@ -887,6 +892,11 @@ class Home extends Base { | ||
887 | ],dbWhere([ | 892 | ],dbWhere([ |
888 | 'id' => array_column($uid,'id') | 893 | 'id' => array_column($uid,'id') |
889 | ])); | 894 | ])); |
895 | + db()->update('lists_hot',[ | ||
896 | + $d => $fv | ||
897 | + ],dbWhere([ | ||
898 | + 'id' => array_column($uid,'id') | ||
899 | + ])); | ||
890 | } | 900 | } |
891 | 901 | ||
892 | } | 902 | } |
-
请 注册 或 登录 后发表评论