|
@@ -9,6 +9,7 @@ namespace App\Console\Commands\Monitor; |
|
@@ -9,6 +9,7 @@ namespace App\Console\Commands\Monitor; |
|
9
|
|
9
|
|
|
10
|
use App\Models\Domain\DomainInfo;
|
10
|
use App\Models\Domain\DomainInfo;
|
|
11
|
use App\Models\Product\Keyword;
|
11
|
use App\Models\Product\Keyword;
|
|
|
|
12
|
+use App\Models\Project\DeployOptimize;
|
|
12
|
use App\Models\Project\OnlineCheck;
|
13
|
use App\Models\Project\OnlineCheck;
|
|
13
|
use App\Models\Project\Project;
|
14
|
use App\Models\Project\Project;
|
|
14
|
use App\Repositories\ToolRepository;
|
15
|
use App\Repositories\ToolRepository;
|
|
@@ -259,9 +260,29 @@ class Supervisory extends Command |
|
@@ -259,9 +260,29 @@ class Supervisory extends Command |
|
259
|
file_put_contents(storage_path('data/robots/' . date('Ymd'). 'log.json'), json_encode($tmp, 256));
|
260
|
file_put_contents(storage_path('data/robots/' . date('Ymd'). 'log.json'), json_encode($tmp, 256));
|
|
260
|
unset($tmp);
|
261
|
unset($tmp);
|
|
261
|
|
262
|
|
|
|
|
263
|
+ // 所有路由
|
|
262
|
$domain = array_column($spot_projects, 'domain');
|
264
|
$domain = array_column($spot_projects, 'domain');
|
|
263
|
$domain = array_unique(array_filter($domain));
|
265
|
$domain = array_unique(array_filter($domain));
|
|
264
|
|
266
|
|
|
|
|
267
|
+ // 通知对应优化师
|
|
|
|
268
|
+ $tmp = [];
|
|
|
|
269
|
+ foreach ($spot_projects as $item) {
|
|
|
|
270
|
+ $tmp[$item['domain']] = $item['project_id'];
|
|
|
|
271
|
+ }
|
|
|
|
272
|
+ $project_ids = array_column($spot_projects, 'project_id');
|
|
|
|
273
|
+ $optimist = DeployOptimize::leftJoin('gl_manage', 'gl_project_deploy_optimize.optimist_mid', '=', 'gl_manage.id')
|
|
|
|
274
|
+ ->whereIn('project_id', $project_ids)
|
|
|
|
275
|
+ ->pluck('mobile', 'project_id')
|
|
|
|
276
|
+ ->toArray();
|
|
|
|
277
|
+
|
|
|
|
278
|
+ $notice = [];
|
|
|
|
279
|
+ $all_url = array_merge($error_url, $error, $page_404, $tdk_error);
|
|
|
|
280
|
+ foreach ($all_url as $url) {
|
|
|
|
281
|
+ if (FALSE == empty($optimist[$tmp[parse_url($url, PHP_URL_HOST)]]))
|
|
|
|
282
|
+ $notice[] = '86' . $optimist[$tmp[parse_url($url, PHP_URL_HOST)]];
|
|
|
|
283
|
+ }
|
|
|
|
284
|
+ $notice = array_filter(array_unique($notice));
|
|
|
|
285
|
+
|
|
265
|
$message[] = '开启robots项目数:' . count($robots_ids);
|
286
|
$message[] = '开启robots项目数:' . count($robots_ids);
|
|
266
|
$message[] = '关闭robots项目:' . ($close_ids ? implode(',', $close_ids) : '无');
|
287
|
$message[] = '关闭robots项目:' . ($close_ids ? implode(',', $close_ids) : '无');
|
|
267
|
$message[] = '抽查项目数量: ' . count($domain);
|
288
|
$message[] = '抽查项目数量: ' . count($domain);
|
|
@@ -282,6 +303,7 @@ class Supervisory extends Command |
|
@@ -282,6 +303,7 @@ class Supervisory extends Command |
|
282
|
'keyword' => '项目数据推送',
|
303
|
'keyword' => '项目数据推送',
|
|
283
|
'msg' => $msg,
|
304
|
'msg' => $msg,
|
|
284
|
'isAtAll' => false, // 是否@所有人
|
305
|
'isAtAll' => false, // 是否@所有人
|
|
|
|
306
|
+ 'atMobiles' => $notice
|
|
285
|
];
|
307
|
];
|
|
286
|
$dingService->handle($body, $link);
|
308
|
$dingService->handle($body, $link);
|
|
287
|
}
|
309
|
}
|