|
@@ -29,22 +29,22 @@ class Temp extends Command |
|
@@ -29,22 +29,22 @@ class Temp extends Command |
|
29
|
public function handle()
|
29
|
public function handle()
|
|
30
|
{
|
30
|
{
|
|
31
|
$notify_model = new Notify();
|
31
|
$notify_model = new Notify();
|
|
|
|
32
|
+ $project_model = new Project();
|
|
|
|
33
|
+ $serve_ip_model = new ServersIp();
|
|
32
|
|
34
|
|
|
33
|
$domain_list = DomainInfo::where('status', 1)->where('amp_status', 1)->get();
|
35
|
$domain_list = DomainInfo::where('status', 1)->where('amp_status', 1)->get();
|
|
34
|
|
36
|
|
|
35
|
- foreach ($domain_list as $domain) {
|
|
|
|
36
|
- $project_id = $domain->project_id;
|
|
|
|
37
|
- $domain = $domain->domain;
|
37
|
+ foreach ($domain_list as $domain_info) {
|
|
|
|
38
|
+ $project_id = $domain_info->project_id;
|
|
|
|
39
|
+ $domain = $domain_info->domain;
|
|
38
|
|
40
|
|
|
39
|
$this->output('项目id:' . $project_id . ',start');
|
41
|
$this->output('项目id:' . $project_id . ',start');
|
|
40
|
|
42
|
|
|
41
|
//获取项目所在服务器
|
43
|
//获取项目所在服务器
|
|
42
|
- $project_model = new Project();
|
|
|
|
43
|
$project_info = $project_model->read(['id' => $project_id], ['serve_id']);
|
44
|
$project_info = $project_model->read(['id' => $project_id], ['serve_id']);
|
|
44
|
if (!$project_info) {
|
45
|
if (!$project_info) {
|
|
45
|
$this->output('未查询到项目数据');
|
46
|
$this->output('未查询到项目数据');
|
|
46
|
}
|
47
|
}
|
|
47
|
- $serve_ip_model = new ServersIp();
|
|
|
|
48
|
$serve_ip_info = $serve_ip_model->read(['id' => $project_info['serve_id']], ['servers_id']);
|
48
|
$serve_ip_info = $serve_ip_model->read(['id' => $project_info['serve_id']], ['servers_id']);
|
|
49
|
if (!$serve_ip_info) {
|
49
|
if (!$serve_ip_info) {
|
|
50
|
$this->output('未查询到服务器数据');
|
50
|
$this->output('未查询到服务器数据');
|
|
@@ -80,15 +80,9 @@ class Temp extends Command |
|
@@ -80,15 +80,9 @@ class Temp extends Command |
|
80
|
}
|
80
|
}
|
|
81
|
} else {
|
81
|
} else {
|
|
82
|
//其他服务器:请求对应C端接口
|
82
|
//其他服务器:请求对应C端接口
|
|
83
|
- $c_url = $domain . '/api/update_page/';
|
|
|
|
84
|
- $param = [
|
|
|
|
85
|
- 'project_id' => $project_id,
|
|
|
|
86
|
- 'type' => 3,
|
|
|
|
87
|
- 'route' => 1,
|
|
|
|
88
|
- 'url' => [],
|
|
|
|
89
|
- 'language' => []
|
|
|
|
90
|
- ];
|
|
|
|
91
|
- http_post($c_url, json_encode($param));
|
83
|
+ $c_url = $domain . '/api/update_page/?project_id=' . $project_id . '&type=3';
|
|
|
|
84
|
+ $re = http_get($c_url);
|
|
|
|
85
|
+ $this->output($re['message'] ?? '');
|
|
92
|
}
|
86
|
}
|
|
93
|
$this->output('项目id:' . $project_id . ',end');
|
87
|
$this->output('项目id:' . $project_id . ',end');
|
|
94
|
}
|
88
|
}
|