...
|
...
|
@@ -109,6 +109,11 @@ class MailListV2Es2 extends Base { |
|
|
if($keyword){
|
|
|
$where['subject'] = $keyword;
|
|
|
}
|
|
|
$query = [
|
|
|
'bool'=>[
|
|
|
'must' => []
|
|
|
]
|
|
|
];
|
|
|
// 联系人
|
|
|
$address = app()->request('address');
|
|
|
if($address){
|
...
|
...
|
@@ -121,6 +126,13 @@ class MailListV2Es2 extends Base { |
|
|
$where['from.email'] = $address['from'];
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
$query['bool']['must'][] = [
|
|
|
"bool" => ["should"=>[
|
|
|
["match_phrase" => ["from.email"=>$address]],
|
|
|
["match_phrase" => ["to"=>$address]],
|
|
|
]]
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -140,11 +152,7 @@ class MailListV2Es2 extends Base { |
|
|
unset($where['is_hots'],$where['is_auto'],$where['deleted']);
|
|
|
}
|
|
|
|
|
|
$query = [
|
|
|
'bool'=>[
|
|
|
'must' => []
|
|
|
]
|
|
|
];
|
|
|
|
|
|
foreach ($where as $k=>$v){
|
|
|
if($k=='subject'){
|
|
|
if($v){
|
...
|
...
|
|