IndexedPages.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace App\Console\Commands\RankData;
use App\Http\Logic\Bside\RankData\RankDataLogic;
use App\Models\Project\DeployOptimize;
use Illuminate\Support\Facades\Log;
/**
* Class IndexedPages
* @package App\Console\Commands
* @author zbj
* @date 2023/5/11
*/
class IndexedPages extends BaseCommands
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'rank_data_indexed_pages';
/**
* The console command description.
*
* @var string
*/
protected $description = '排名数据-页面收录数';
/**
* @throws \Exception
* @author zbj
* @date 2023/5/11
*/
public function do(){
//有排名api编号的项目
$list = DeployOptimize::where('api_no', '>', 0)->pluck('api_no', 'project_id')->toArray();
Log::channel('rank_data')->info('开始-页面收录数据-'.count($list));
foreach ($list as $project_id => $api_no) {
Log::channel('rank_data')->info('开始-页面收录数据-' . $project_id . '->' .$api_no);
$rankDataLogic = new RankDataLogic();
$rankDataLogic->syncIndexedPages($api_no, true);
}
return true;
}
}