作者 邓超

x

正在显示 1 个修改的文件 包含 23 行增加24 行删除
... ... @@ -4,30 +4,29 @@
include_once "../vendor/autoload.php";
$fid = 1;
while ($fid){
$fid = db()->value(\Model\folderSql::first([
'id.>' => $fid
],
'`id`'
));
if(!$fid){
break;
}
// 总数
$folder['exsts'] = db()->count(\Model\listsSql::listCount(
dbWhere(['folder_id'=> $fid, 'deleted' => 0])
));
// 未读
$folder['unseen'] = db()->count(\Model\listsSql::listCount(
dbWhere(['folder_id'=> $fid, 'seen' => 0, 'deleted' => 0])
));
_echo('fid: '.$fid.' data: '.json_encode($folder));
db()->update(\Model\folderSql::$table,$folder,'`id` = '.$fid,false);
// 查询不是预热邮箱
$eids = db()->all('SELECT id FROM emails LEFT JOIN hot_mail ON emails.email = hot_mail.email WHERE hot_mail.email is NULL AND pwd_error = 0');
$eids = array_column($eids,'id');
foreach ($eids as $eid){
// 查询文件夹
$fids = db()->all(\Model\folderSql::all($eid,'`id`'));
array_map(function ($fid){
// 总数
$folder['exsts'] = db()->count(\Model\listsSql::listCount(
dbWhere(['folder_id'=> $fid, 'deleted' => 0])
));
// 未读
$folder['unseen'] = db()->count(\Model\listsSql::listCount(
dbWhere(['folder_id'=> $fid, 'seen' => 0, 'deleted' => 0])
));
_echo('fid: '.$fid.' data: '.json_encode($folder));
db()->update(\Model\folderSql::$table,$folder,'`id` = '.$fid,false);
},array_column($fids,'id'));
}
_echo('完成');
... ...