|
...
|
...
|
@@ -67,10 +67,14 @@ class SendKeyword extends Command |
|
|
|
$send_num = [30 => 1000, 50 => 2000, 60 => 4000, 70 => 6000];
|
|
|
|
$ban_domain = $this->banDomain();
|
|
|
|
foreach ($projects as $item) {
|
|
|
|
if (empty($item->is_auto_keywords))
|
|
|
|
if (empty($item->is_auto_keywords)) {
|
|
|
|
$this->output('项目ID:' . $item->id . ', 未开启推送配置;');
|
|
|
|
continue;
|
|
|
|
if (in_array($item->domain, $ban_domain))
|
|
|
|
}
|
|
|
|
if (in_array($item->domain, $ban_domain)) {
|
|
|
|
$this->output('项目ID:' . $item->id . ', 域名被禁用;');
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (empty($item->api_no)) {
|
|
|
|
$this->output('项目ID:' . $item->id . ', api_no为空;');
|
|
|
|
continue;
|
|
...
|
...
|
@@ -89,11 +93,15 @@ class SendKeyword extends Command |
|
|
|
|
|
|
|
// 项目是否达标
|
|
|
|
$compliance = RankData::where(['project_id' => $item->id, 'api_no' => $item->api_no, 'lang' => ''])->value('is_compliance');
|
|
|
|
if (FALSE == empty($compliance))
|
|
|
|
return false;
|
|
|
|
if (FALSE == empty($compliance)) {
|
|
|
|
$this->output('项目ID:' . $item->id . ', 项目已达标,不需要推送;');
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$project = ProjectServer::useProject($item->id);
|
|
|
|
if (empty($project)) {
|
|
|
|
$this->output('项目ID:' . $item->id . ', 项目链接失败;');
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
continue;
|
|
|
|
}
|
|
...
|
...
|
@@ -109,6 +117,7 @@ class SendKeyword extends Command |
|
|
|
$item['apino'] = $item['api_no'];
|
|
|
|
$this->sendNotice($item);
|
|
|
|
}
|
|
|
|
$this->output('项目ID:' . $item['id'] . ', ' . ($send ? '推送完成' : '无推送关键词;'));
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|