...
|
...
|
@@ -176,25 +176,23 @@ class MailListV2 extends Base { |
|
|
// 模糊标题搜索
|
|
|
$subject = app()->request('subject');
|
|
|
if($subject){
|
|
|
$sql.=' and (';
|
|
|
$subject = is_array($subject) ? $subject : [$subject];
|
|
|
foreach ($subject as $sub){
|
|
|
$sql.=' `subject` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%" or ';
|
|
|
foreach ($subject as $k=>$sub){
|
|
|
$subject[$k] = '`subject` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%"';
|
|
|
}
|
|
|
$sql = rtrim($sql,'or ');
|
|
|
$sql.=')';
|
|
|
}
|
|
|
// 不在此邮箱中的
|
|
|
$from_not_in_like = app()->request('from_not_in_like');
|
|
|
if($from_not_in_like){
|
|
|
$sql.=' and (';
|
|
|
$from_not_in_like = is_array($from_not_in_like) ? $from_not_in_like : [$from_not_in_like];
|
|
|
foreach ($from_not_in_like as $sub){
|
|
|
$sql.='`from` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%" or ';
|
|
|
foreach ($from_not_in_like as $k=>$sub){
|
|
|
$from_not_in_like[$k] = '`from` '.(empty($is_auto_inbox)?' not ':'').'like "%%'.addslashes($sub).'%%"';
|
|
|
}
|
|
|
$sql = rtrim($sql,'or ');
|
|
|
$sql.=')';
|
|
|
}
|
|
|
|
|
|
$sql .= ' and ('. implode(' or ',$subject).' or '. implode(' or ',$from_not_in_like) .')';
|
|
|
|
|
|
|
|
|
/************ 2024-09-02 *************/
|
|
|
|
|
|
// 查询列表数据
|
...
|
...
|
|