正在显示
1 个修改的文件
包含
23 行增加
和
24 行删除
@@ -4,30 +4,29 @@ | @@ -4,30 +4,29 @@ | ||
4 | 4 | ||
5 | include_once "../vendor/autoload.php"; | 5 | include_once "../vendor/autoload.php"; |
6 | 6 | ||
7 | -$fid = 1; | ||
8 | - | ||
9 | -while ($fid){ | ||
10 | - $fid = db()->value(\Model\folderSql::first([ | ||
11 | - 'id.>' => $fid | ||
12 | - ], | ||
13 | - '`id`' | ||
14 | - )); | ||
15 | - if(!$fid){ | ||
16 | - break; | ||
17 | - } | ||
18 | - | ||
19 | - // 总数 | ||
20 | - $folder['exsts'] = db()->count(\Model\listsSql::listCount( | ||
21 | - dbWhere(['folder_id'=> $fid, 'deleted' => 0]) | ||
22 | - )); | ||
23 | - // 未读 | ||
24 | - $folder['unseen'] = db()->count(\Model\listsSql::listCount( | ||
25 | - dbWhere(['folder_id'=> $fid, 'seen' => 0, 'deleted' => 0]) | ||
26 | - )); | ||
27 | - | ||
28 | - _echo('fid: '.$fid.' data: '.json_encode($folder)); | ||
29 | - | ||
30 | - db()->update(\Model\folderSql::$table,$folder,'`id` = '.$fid,false); | 7 | +// 查询不是预热邮箱 |
8 | +$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'); | ||
31 | 9 | ||
10 | +$eids = array_column($eids,'id'); | ||
11 | + | ||
12 | +foreach ($eids as $eid){ | ||
13 | + // 查询文件夹 | ||
14 | + $fids = db()->all(\Model\folderSql::all($eid,'`id`')); | ||
15 | + array_map(function ($fid){ | ||
16 | + // 总数 | ||
17 | + $folder['exsts'] = db()->count(\Model\listsSql::listCount( | ||
18 | + dbWhere(['folder_id'=> $fid, 'deleted' => 0]) | ||
19 | + )); | ||
20 | + // 未读 | ||
21 | + $folder['unseen'] = db()->count(\Model\listsSql::listCount( | ||
22 | + dbWhere(['folder_id'=> $fid, 'seen' => 0, 'deleted' => 0]) | ||
23 | + )); | ||
24 | + | ||
25 | + _echo('fid: '.$fid.' data: '.json_encode($folder)); | ||
26 | + | ||
27 | + db()->update(\Model\folderSql::$table,$folder,'`id` = '.$fid,false); | ||
28 | + | ||
29 | + },array_column($fids,'id')); | ||
32 | } | 30 | } |
31 | +_echo('完成'); | ||
33 | 32 |
-
请 注册 或 登录 后发表评论