作者 邓超

统计

@@ -51,6 +51,14 @@ class Folder extends Base { @@ -51,6 +51,14 @@ class Folder extends Base {
51 foreach ($folders as $k=>$folder){ 51 foreach ($folders as $k=>$folder){
52 if($folder['email_id'] == $eid){ 52 if($folder['email_id'] == $eid){
53 unset($folder['email_id']); 53 unset($folder['email_id']);
  54 + // 总数
  55 + $folder['exsts'] = db()->count(listsSql::listCount(
  56 + dbWhere(['folder_id'=> $folder['id'], 'deleted' => 0])
  57 + ));
  58 + // 未读
  59 + $folder['unseen'] = db()->count(listsSql::listCount(
  60 + dbWhere(['folder_id'=> $folder['id'], 'seen' => 0, 'deleted' => 0])
  61 + ));
54 $data[$email][$k] = $folder; 62 $data[$email][$k] = $folder;
55 } 63 }
56 } 64 }