作者 邓超

fob

... ... @@ -195,9 +195,10 @@ class MailList extends Base {
public function count(){
$emails = $this->getEmails('id');
$sql = "select count(*) from `fob_hot_mail` left join `lists` on `fob_hot_mail`.`lists_id` = `lists`.`id` where `lists`.`deleted` = 0 and ";
$sql = "select count(*) from `fob_hot_mail` left join `lists` on `fob_hot_mail`.`lists_id` = `lists`.`id` where ";
$where = ['lists|email_id'=>$emails];
$where['deleted'] = 0; //未删状态
// 预热收件箱
$where['folder'] = 's';
$sCount = db()->count($sql.dbWhere($where));
... ... @@ -205,15 +206,14 @@ class MailList extends Base {
$where['folder'] = 'f';
$fCount = db()->count($sql.dbWhere($where));
unset($where['folder']);
$where = ['lists|email_id'=>$emails];
// 屏蔽哪些邮件
$where['from.notin'] = $this->from_not_in();
if(!$where['from.notin']) unset($where['from.notin']);
$where['deleted'] = 0; //未删状态
$where['folder_id'] = $this->getFolderId('发件箱');
// 发件箱
$sql = "select count(*) from `lists` left join `fob_hot_mail` on `lists`.`id` = `fob_hot_mail`.`lists_id` where ISNULL(`lists_id`) and ";
... ...