作者 邓超

x

@@ -136,6 +136,10 @@ class MailListV2 extends Base { @@ -136,6 +136,10 @@ class MailListV2 extends Base {
136 }elseif ($folder=='预热发件箱'){ 136 }elseif ($folder=='预热发件箱'){
137 $folder = '发件箱'; 137 $folder = '发件箱';
138 $where['is_hots'] = 1; 138 $where['is_hots'] = 1;
  139 + } elseif ($folder=='自动回复收件箱'){
  140 + $is_auto_inbox = 1;
  141 + $folder = '收件箱';
  142 + $where['is_hots'] = 0;
139 } 143 }
140 144
141 $seen = app()->request('seen',-1,'intval'); 145 $seen = app()->request('seen',-1,'intval');
@@ -168,6 +172,26 @@ class MailListV2 extends Base { @@ -168,6 +172,26 @@ class MailListV2 extends Base {
168 172
169 $sql = "select %s from `lists` where ".dbWhere($where); 173 $sql = "select %s from `lists` where ".dbWhere($where);
170 174
  175 + /************ 2024-09-02 *************/
  176 + // 模糊标题搜索
  177 + $subject = app()->request('subject');
  178 + if($subject){
  179 + $subject = is_array($subject) ? $subject : [$subject];
  180 + foreach ($subject as $sub){
  181 + $sql.=' and `subject` .'.(empty($is_auto_inbox)?' not ':'').'like "%'.addslashes($sub).'%"';
  182 + }
  183 + }
  184 + // 不在此邮箱中的
  185 + $subject = app()->request('from_not_in_like');
  186 + if($subject){
  187 + $subject = is_array($subject) ? $subject : [$subject];
  188 + foreach ($subject as $sub){
  189 + $sql.=' and `from` .'.(empty($is_auto_inbox)?' not ':'').'like "%'.addslashes($sub).'%"';
  190 + }
  191 + }
  192 + /************ 2024-09-02 *************/
  193 +
  194 +
171 // 查询列表数据 195 // 查询列表数据
172 $lists = db()->all(sprintf($sql,$filed)." order by `udate` desc limit {$limit} offset ".(($page-1)*$limit)); 196 $lists = db()->all(sprintf($sql,$filed)." order by `udate` desc limit {$limit} offset ".(($page-1)*$limit));
173 197