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