...
|
...
|
@@ -19,6 +19,8 @@ use function Swoole\Coroutine\Http\request; |
|
|
*/
|
|
|
class MailListV2 extends Base {
|
|
|
|
|
|
private $cache = 0;
|
|
|
|
|
|
/**
|
|
|
* 当前邮箱下指定的文件夹
|
|
|
* @param string $folder
|
...
|
...
|
@@ -180,7 +182,7 @@ class MailListV2 extends Base { |
|
|
},$lists?:[]);
|
|
|
|
|
|
// 总数
|
|
|
$total = db()->cache(600)->count(sprintf($sql,"count(*)"));
|
|
|
$total = db()->cache($this->cache)->count(sprintf($sql,"count(*)"));
|
|
|
|
|
|
app()->_json(listsPage($lists,$total,$page,$limit));
|
|
|
|
...
|
...
|
@@ -212,44 +214,44 @@ class MailListV2 extends Base { |
|
|
$where['folder_id'] = $this->getFolderId('发件箱');
|
|
|
// 预热发件箱
|
|
|
$where['is_hots'] = 1;
|
|
|
$fCount = db()->cache(600)->count($sql.dbWhere($where));
|
|
|
$fCount = db()->cache($this->cache)->count($sql.dbWhere($where));
|
|
|
}
|
|
|
|
|
|
// 预热收件箱
|
|
|
if(in_array('hot_inbox',$show_count_filed)) {
|
|
|
$where['folder_id'] = $this->getFolderId('收件箱');
|
|
|
$where['is_hots'] = 1;
|
|
|
$sCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
$sCount = db()->cache($this->cache)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
|
|
|
if(in_array('send',$show_count_filed)) {
|
|
|
$where['folder_id'] = $this->getFolderId('发件箱');
|
|
|
$where['is_hots'] = 0;
|
|
|
$faCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
$faCount = db()->cache($this->cache)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
// 垃圾箱
|
|
|
if(in_array('junk',$show_count_filed)) {
|
|
|
$where['folder_id'] = $this->getFolderId('垃圾箱');
|
|
|
$where['is_hots'] = 0;
|
|
|
$lajiCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
$lajiCount = db()->cache($this->cache)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
// 收件箱
|
|
|
if(in_array('inbox',$show_count_filed)) {
|
|
|
$where['folder_id'] = $this->getFolderId('收件箱');
|
|
|
$where['is_hots'] = 0;
|
|
|
$shouCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
$shouCount = db()->cache($this->cache)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
// 未读
|
|
|
if(in_array('unseen',$show_count_filed)) {
|
|
|
$where['seen'] = 0;
|
|
|
$where['is_hots'] = 0;
|
|
|
$seenCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
$seenCount = db()->cache($this->cache)->count($sql . dbWhere($where));
|
|
|
unset($where['seen']);
|
|
|
}
|
|
|
// 星标
|
|
|
if(in_array('flagged',$show_count_filed)) {
|
|
|
$where['flagged'] = 1;
|
|
|
$flaggedCount = db()->cache(600)->count($sql . dbWhere($where));
|
|
|
$flaggedCount = db()->cache($this->cache)->count($sql . dbWhere($where));
|
|
|
}
|
|
|
$data = [];
|
|
|
if(isset($shouCount)) $data['inbox'] = $shouCount;
|
...
|
...
|
|