作者 邓超

fob

@@ -195,9 +195,9 @@ class MailList extends Base { @@ -195,9 +195,9 @@ class MailList extends Base {
195 public function count(){ 195 public function count(){
196 $emails = $this->getEmails('id'); 196 $emails = $this->getEmails('id');
197 197
198 - $sql = "select count(*) from `fob_hot_mail` where "; 198 + $sql = "select count(*) from `fob_hot_mail` left join `lists` on `fob_hot_mail`.`lists_id` = `lists`.`id` where `lists`.`deleted` = 0 and ";
199 199
200 - $where = ['email_id'=>$emails]; 200 + $where = ['lists|email_id'=>$emails];
201 // 预热收件箱 201 // 预热收件箱
202 $where['folder'] = 's'; 202 $where['folder'] = 's';
203 $sCount = db()->count($sql.dbWhere($where)); 203 $sCount = db()->count($sql.dbWhere($where));
@@ -206,15 +206,17 @@ class MailList extends Base { @@ -206,15 +206,17 @@ class MailList extends Base {
206 $fCount = db()->count($sql.dbWhere($where)); 206 $fCount = db()->count($sql.dbWhere($where));
207 207
208 208
  209 + $where = ['lists|email_id'=>$emails];
  210 +
209 // 屏蔽哪些邮件 211 // 屏蔽哪些邮件
210 $where['from.notin'] = $this->from_not_in(); 212 $where['from.notin'] = $this->from_not_in();
211 if(!$where['from.notin']) unset($where['from.notin']); 213 if(!$where['from.notin']) unset($where['from.notin']);
212 214
213 - $where = ['lists|email_id'=>$emails]; 215 + $where['deleted'] = 0; //未删状态
  216 +
214 $where['folder_id'] = $this->getFolderId('发件箱'); 217 $where['folder_id'] = $this->getFolderId('发件箱');
215 // 发件箱 218 // 发件箱
216 $sql = "select count(*) from `lists` left join `fob_hot_mail` on `lists`.`id` = `fob_hot_mail`.`lists_id` where ISNULL(`lists_id`) and "; 219 $sql = "select count(*) from `lists` left join `fob_hot_mail` on `lists`.`id` = `fob_hot_mail`.`lists_id` where ISNULL(`lists_id`) and ";
217 -  
218 $faCount = db()->count($sql.dbWhere($where)); 220 $faCount = db()->count($sql.dbWhere($where));
219 221
220 // 垃圾箱 222 // 垃圾箱