|
...
|
...
|
@@ -581,6 +581,41 @@ class MailListV2Es2 extends Base { |
|
|
|
return $hits;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 统计模板的回复数量
|
|
|
|
* @author:dc
|
|
|
|
* @time 2025/12/19 16:56
|
|
|
|
*/
|
|
|
|
public function aiTempReplyCount(){
|
|
|
|
$postid = app()->request('postid',0);
|
|
|
|
if(!$postid){
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
$subjects = app()->request('subjects');
|
|
|
|
|
|
|
|
$query = [
|
|
|
|
"bool"=>[
|
|
|
|
"must"=>[
|
|
|
|
["term"=>["postid"=>$postid]],
|
|
|
|
["term"=>["source"=>2]],
|
|
|
|
["term"=>["folder_as_int"=>1]],
|
|
|
|
[
|
|
|
|
'query_string' => [
|
|
|
|
'query'=> implode(" ",array_map(function ($v){
|
|
|
|
return '"'.addcslashes($v,'"').'"';
|
|
|
|
},$subjects)),
|
|
|
|
"default_field"=> "subject"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
$count = $this->es->count(['query'=>$query]);
|
|
|
|
|
|
|
|
return [
|
|
|
|
'count' => $count
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
...
|
...
|
|