...
|
...
|
@@ -7,6 +7,7 @@ namespace Controller\fob_ai; |
|
|
use Controller\Base;
|
|
|
use Lib\Verify;
|
|
|
use Model\folderSql;
|
|
|
use function Swoole\Coroutine\Http\request;
|
|
|
|
|
|
/**
|
|
|
* 黑格 fob 那边专用 业务
|
...
|
...
|
@@ -188,7 +189,7 @@ class MailList extends Base { |
|
|
},$lists?:[]);
|
|
|
|
|
|
// 总数
|
|
|
$total = db()->count(sprintf($sql,"count(*)"));
|
|
|
$total = db()->cache(600)->count(sprintf($sql,"count(*)"));
|
|
|
|
|
|
app()->_json(listsPage($lists,$total,$page,$limit));
|
|
|
|
...
|
...
|
@@ -220,42 +221,42 @@ class MailList extends Base { |
|
|
$where['lists|folder_id'] = $this->getFolderId('发件箱');
|
|
|
// 预热发件箱
|
|
|
$where['fob_hot_mail|folder'] = 'f';
|
|
|
$fCount = db()->count($sql.dbWhere($where));
|
|
|
$fCount = db()->cache(600)->count($sql.dbWhere($where));
|
|
|
}
|
|
|
|
|
|
// 预热收件箱
|
|
|
if(in_array('hot_inbox',$show_count_filed)) {
|
|
|
$where['lists|folder_id'] = $this->getFolderId('收件箱');
|
|
|
$where['fob_hot_mail|folder'] = 's';
|
|
|
$sCount = db()->count($sql . dbWhere($where));
|
|
|
$sCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
unset($where['fob_hot_mail|folder']);
|
|
|
|
|
|
$sql = $sql." ISNULL(`lists_id`) and ";
|
|
|
if(in_array('send',$show_count_filed)) {
|
|
|
$where['lists|folder_id'] = $this->getFolderId('发件箱');
|
|
|
$faCount = db()->count($sql . dbWhere($where));
|
|
|
$faCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
// 垃圾箱
|
|
|
if(in_array('junk',$show_count_filed)) {
|
|
|
$where['lists|folder_id'] = $this->getFolderId('垃圾箱');
|
|
|
$lajiCount = db()->count($sql . dbWhere($where));
|
|
|
$lajiCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
// 收件箱
|
|
|
if(in_array('inbox',$show_count_filed)) {
|
|
|
$where['lists|folder_id'] = $this->getFolderId('收件箱');
|
|
|
$shouCount = db()->count($sql . dbWhere($where));
|
|
|
$shouCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
// 未读
|
|
|
if(in_array('unseen',$show_count_filed)) {
|
|
|
$where['seen'] = 0;
|
|
|
$seenCount = db()->count($sql . dbWhere($where));
|
|
|
$seenCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
unset($where['seen']);
|
|
|
}
|
|
|
// 星标
|
|
|
if(in_array('flagged',$show_count_filed)) {
|
|
|
$where['flagged'] = 1;
|
|
|
$flaggedCount = db()->count($sql . dbWhere($where));
|
|
|
$flaggedCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
$data = [];
|
|
|
if(isset($shouCount)) $data['inbox'] = $shouCount;
|
...
|
...
|
|