正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -41,6 +41,7 @@ class RankData extends BaseCommands | @@ -41,6 +41,7 @@ class RankData extends BaseCommands | ||
| 41 | $api = new QuanqiusouApi(); | 41 | $api = new QuanqiusouApi(); |
| 42 | //有排名api编号的项目 | 42 | //有排名api编号的项目 |
| 43 | $list = DeployOptimize::where('api_no', '>' , 0)->select('api_no','minor_languages','project_id')->get(); | 43 | $list = DeployOptimize::where('api_no', '>' , 0)->select('api_no','minor_languages','project_id')->get(); |
| 44 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($list, true) . PHP_EOL, FILE_APPEND); | ||
| 44 | //当日所有站点谷歌收录数据 | 45 | //当日所有站点谷歌收录数据 |
| 45 | $site_res = $api->getSiteRes(); | 46 | $site_res = $api->getSiteRes(); |
| 46 | if(!$site_res){ | 47 | if(!$site_res){ |
| @@ -48,6 +49,7 @@ class RankData extends BaseCommands | @@ -48,6 +49,7 @@ class RankData extends BaseCommands | ||
| 48 | } | 49 | } |
| 49 | foreach ($list as $item){ | 50 | foreach ($list as $item){ |
| 50 | $model = GoogleRankModel::where('project_id', $item['project_id'])->where('lang', '')->first(); | 51 | $model = GoogleRankModel::where('project_id', $item['project_id'])->where('lang', '')->first(); |
| 52 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export('11111111111111-进入', true) . PHP_EOL, FILE_APPEND); | ||
| 51 | if (!$model || $model->updated_date != date('Y-m-d')) { | 53 | if (!$model || $model->updated_date != date('Y-m-d')) { |
| 52 | $res = $api->getGoogleRank($item['api_no']); | 54 | $res = $api->getGoogleRank($item['api_no']); |
| 53 | if(!$res){ | 55 | if(!$res){ |
| @@ -55,7 +57,6 @@ class RankData extends BaseCommands | @@ -55,7 +57,6 @@ class RankData extends BaseCommands | ||
| 55 | continue; | 57 | continue; |
| 56 | } | 58 | } |
| 57 | //收录数 | 59 | //收录数 |
| 58 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('11111111111111-进入', true) . PHP_EOL, FILE_APPEND); | ||
| 59 | $indexed_pages_num = $site_res[$item['api_no']] ?? 0; | 60 | $indexed_pages_num = $site_res[$item['api_no']] ?? 0; |
| 60 | $this->save_rank($item['project_id'], $res, $indexed_pages_num); | 61 | $this->save_rank($item['project_id'], $res, $indexed_pages_num); |
| 61 | } | 62 | } |
-
请 注册 或 登录 后发表评论