作者 邓超

统计

... ... @@ -408,6 +408,13 @@ class MailListV2 extends Base {
$shouCount = db()->cache($this->cache)->count($sql . dbWhere($where));
// 收件箱中标记为已回复的邮件
if(in_array('replied',$show_count_filed)){
$where['answered'] = 1;
$repliedCount = db()->cache($this->cache)->count($sql . dbWhere($where));
unset($where['answered']);
}
// 未读
if(in_array('unseen',$show_count_filed)) {
$where['seen'] = 0;
... ... @@ -430,6 +437,7 @@ class MailListV2 extends Base {
$data = [];
if(isset($shouCount)) $data['inbox'] = $shouCount;
if(isset($repliedCount)) $data['replied'] = $repliedCount;
if(isset($faCount)) $data['send'] = $faCount;
if(isset($seenCount)) $data['unseen'] = $seenCount;
if(isset($flaggedCount)) $data['flagged'] = $flaggedCount;
... ...