作者 邓超

x

... ... @@ -53,17 +53,17 @@ class Folder extends Base {
if($folder['email_id'] == $eid){
unset($folder['email_id']);
// 总数
$folder['exsts'] = db()->count(listsSql::listCount(
dbWhere(['folder_id'=> $folder['id'], 'deleted' => 0])
));
if($folder['folder']=='收件箱'){
// 未读
$folder['unseen'] = db()->count(listsSql::listCount(
dbWhere(['folder_id'=> $folder['id'], 'seen' => 0, 'deleted' => 0])
));
}else{
$folder['unseen'] = 0;
}
// $folder['exsts'] = db()->count(listsSql::listCount(
// dbWhere(['folder_id'=> $folder['id'], 'deleted' => 0])
// ));
// if($folder['folder']=='收件箱'){
// // 未读
// $folder['unseen'] = db()->count(listsSql::listCount(
// dbWhere(['folder_id'=> $folder['id'], 'seen' => 0, 'deleted' => 0])
// ));
// }else{
// $folder['unseen'] = 0;
// }
$data[$email][$k] = $folder;
}
... ...
... ... @@ -233,28 +233,28 @@ class SyncMail {
_echo($this->emailId().' ===> '.$folder->getName().' ===> '.$num);
}
}
$fid = $this->getFolderId($folder->getName());
// 更新数量
// $this->db->update(folderSql::$table,[
// 'exsts' => $this->db->count(listsSql::listCount(
// dbWhere(
// [
// 'folder_id'=>$this->getFolderId($folder->getName()),
// 'deleted' => 0,
// ]
// )
// )),
// 'unseen' => $this->db->count(listsSql::listCount(
// dbWhere(
// [
// 'folder_id'=>$this->getFolderId($folder->getName()),
// 'seen' => 0,
// 'deleted' => 0,
// ]
// )
// )),
// 'last_sync_time' => time()
// ],dbWhere(['email_id'=>$this->emailId(),'uuid'=>md5($this->emailId().$folder->getName())]),false);
$this->db->update(folderSql::$table,[
'exsts' => $this->db->count(listsSql::listCount(
dbWhere(
[
'folder_id'=>$fid,
'deleted' => 0,
]
)
)),
'unseen' => $this->db->count(listsSql::listCount(
dbWhere(
[
'folder_id'=>$fid,
'seen' => 0,
'deleted' => 0,
]
)
)),
'last_sync_time' => time()
],dbWhere(['email_id'=>$this->emailId(),'id'=>$fid]),false);
}
}
... ...