作者 邓超

预热邮件

... ... @@ -379,6 +379,7 @@ class MailListV2 extends Base {
$show_count_filed = app()->requestArr('show_count_filed',['inbox', 'send', 'unseen', 'flagged', 'junk', 'hot_inbox', 'hot_send']);
$sql = "select count(*) from `".$this->getTable()."` where ";
$sqlhot = "select count(*) from `lists_hot` where ";
$where['deleted'] = 0; //未删状态
... ... @@ -387,14 +388,16 @@ class MailListV2 extends Base {
// $where['folder_id'] = $this->getFolderId('发件箱');
// 预热发件箱
$where['is_hots'] = 1;
$fCount = db()->cache($this->cache)->count($sql.$this->assignSql3('发件箱').dbWhere($where));
$fCount = db()->cache(86400)->count($sql.$this->assignSql3('发件箱').dbWhere($where));
$fCount += db()->cache(86400)->count($sqlhot.$this->assignSql3('发件箱').dbWhere($where));
}
// 预热收件箱
if(in_array('hot_inbox',$show_count_filed)) {
// $where['folder_id'] = $this->getFolderId('收件箱');
$where['is_hots'] = 1;
$sCount = db()->cache($this->cache)->count($sql .$this->assignSql3('收件箱'). dbWhere($where));
$sCount = db()->cache(86400)->count($sql .$this->assignSql3('收件箱'). dbWhere($where));
$sCount += db()->cache(86400)->count($sqlhot .$this->assignSql3('收件箱'). dbWhere($where));
}
unset($where['folder_id']);
... ...