作者 邓超

fob

... ... @@ -163,6 +163,32 @@ class MailList extends Base {
}
/**
* 统计收件箱的数量
* @author:dc
* @time 2024/7/19 10:15
*/
public function count(){
$emails = $this->getEmails(['id']);
$sql = "select count(*) from `fob_hot_mail` where ";
$where = ['email_id'=>$emails];
// 收件箱
$where['folder'] = 's';
$sCount = db()->count($sql.dbWhere($where));
// 发件箱
$where['folder'] = 'f';
$fCount = db()->count($sql.dbWhere($where));
app()->_json([
's_count'=> $sCount,
'f_count'=> $fCount,
]);
}
}
... ...
... ... @@ -16,6 +16,7 @@ return [
'v2/lists' => [\Controller\v2\Home::class, 'lists'],
// 黑格专用路由
'fob/lists' => [\Controller\fob_ai\MailList::class, 'lists'],
'fob/count' => [\Controller\fob_ai\MailList::class, 'count'],// 统计数量
// 邮件详情
'info' => [\Controller\Home::class, 'info'],
... ...