作者 邓超

xxx

... ... @@ -410,17 +410,17 @@ class Home extends Base {
$datas[$k]['have_new'] = redis()->getDel('have_new_mail_'.$v['id']);
// 计算
$folders = db()->all(folderSql::all($v['id'],'`id`'));
foreach ($folders as $folder){
$w = [
'email_id' => $v['id'],
'folder_id' => $folder['id'],
];
db()->update(folderSql::$table,[
'exsts' => db()->count(listsSql::listCount(dbWhere($w))),
'unseen' => db()->count(listsSql::listCount(dbWhere(array_merge($w,['seen'=>0])))),
],'`id` = '.$folder['id'],false);
}
// $folders = db()->all(folderSql::all($v['id'],'`id`'));
// foreach ($folders as $folder){
// $w = [
// 'email_id' => $v['id'],
// 'folder_id' => $folder['id'],
// ];
// db()->update(folderSql::$table,[
// 'exsts' => db()->count(listsSql::listCount(dbWhere($w))),
// 'unseen' => db()->count(listsSql::listCount(dbWhere(array_merge($w,['seen'=>0])))),
// ],'`id` = '.$folder['id'],false);
// }
}
// 返回成功的参数值
... ...