|
@@ -63,7 +63,7 @@ class DomainInfo extends Command |
|
@@ -63,7 +63,7 @@ class DomainInfo extends Command |
|
63
|
public function startUpdateDomain()
|
63
|
public function startUpdateDomain()
|
|
64
|
{
|
64
|
{
|
|
65
|
$domainModel = new DomainInfoModel();
|
65
|
$domainModel = new DomainInfoModel();
|
|
66
|
- $list = $domainModel->where('status', '!=', 2)->where(function ($query) {
|
66
|
+ $list = $domainModel->where('status', '=', 1)->where(function ($query) {
|
|
67
|
$query->whereNull('domain_end_time')->orWhere('domain_end_time', '<', date('Y-m-d H:i:s'));
|
67
|
$query->whereNull('domain_end_time')->orWhere('domain_end_time', '<', date('Y-m-d H:i:s'));
|
|
68
|
})->get()->toArray();
|
68
|
})->get()->toArray();
|
|
69
|
foreach ($list as $v) {
|
69
|
foreach ($list as $v) {
|
|
@@ -87,7 +87,7 @@ class DomainInfo extends Command |
|
@@ -87,7 +87,7 @@ class DomainInfo extends Command |
|
87
|
$domainModel = new DomainInfoModel();
|
87
|
$domainModel = new DomainInfoModel();
|
|
88
|
$projectModel = new Project();
|
88
|
$projectModel = new Project();
|
|
89
|
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
|
89
|
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
|
|
90
|
- $list = $domainModel->where('status', '!=', 2)->where(function ($query) use ($end_day) {
|
90
|
+ $list = $domainModel->where('status', '=', 1)->where(function ($query) use ($end_day) {
|
|
91
|
$query->whereNull('certificate_end_time')->orWhere('certificate_end_time', '<', $end_day);
|
91
|
$query->whereNull('certificate_end_time')->orWhere('certificate_end_time', '<', $end_day);
|
|
92
|
})->get()->toArray();
|
92
|
})->get()->toArray();
|
|
93
|
foreach ($list as $v) {
|
93
|
foreach ($list as $v) {
|
|
@@ -99,7 +99,7 @@ class DomainInfo extends Command |
|
@@ -99,7 +99,7 @@ class DomainInfo extends Command |
|
99
|
$ssl['to'] && $data['certificate_end_time'] = $ssl['to'];
|
99
|
$ssl['to'] && $data['certificate_end_time'] = $ssl['to'];
|
|
100
|
|
100
|
|
|
101
|
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
|
101
|
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
|
|
102
|
- if ($v['type'] == 1 && $ssl['to'] < $end_day && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
102
|
+ if ($v['type'] == 1 && $ssl['to'] < $end_day && $project_info && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
|
103
|
//非自建站项目,申请免费证书
|
103
|
//非自建站项目,申请免费证书
|
|
104
|
$this->updatePrivate($v);
|
104
|
$this->updatePrivate($v);
|
|
105
|
|
105
|
|
|
@@ -122,7 +122,7 @@ class DomainInfo extends Command |
|
@@ -122,7 +122,7 @@ class DomainInfo extends Command |
|
122
|
$domainModel = new DomainInfoModel();
|
122
|
$domainModel = new DomainInfoModel();
|
|
123
|
$projectModel = new Project();
|
123
|
$projectModel = new Project();
|
|
124
|
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
|
124
|
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
|
|
125
|
- $list = $domainModel->where('status', '!=', 2)->where('amp_status', 1)->where(function ($query) use ($end_day) {
|
125
|
+ $list = $domainModel->where('status', '=', 1)->where('amp_status', 1)->where(function ($query) use ($end_day) {
|
|
126
|
$query->whereNull('amp_certificate_end_time')->orWhere('amp_certificate_end_time', '<', $end_day);
|
126
|
$query->whereNull('amp_certificate_end_time')->orWhere('amp_certificate_end_time', '<', $end_day);
|
|
127
|
})->get()->toArray();
|
127
|
})->get()->toArray();
|
|
128
|
foreach ($list as $v) {
|
128
|
foreach ($list as $v) {
|
|
@@ -143,7 +143,7 @@ class DomainInfo extends Command |
|
@@ -143,7 +143,7 @@ class DomainInfo extends Command |
|
143
|
$ssl['to'] && $data['amp_certificate_end_time'] = $ssl['to'];
|
143
|
$ssl['to'] && $data['amp_certificate_end_time'] = $ssl['to'];
|
|
144
|
|
144
|
|
|
145
|
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
|
145
|
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
|
|
146
|
- if ($v['amp_type'] == 1 && $ssl['to'] < $end_day && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
146
|
+ if ($v['amp_type'] == 1 && $ssl['to'] < $end_day && $project_info && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
|
147
|
//非自建站项目,申请免费证书
|
147
|
//非自建站项目,申请免费证书
|
|
148
|
$this->updateAmpPrivate($v['domain']);
|
148
|
$this->updateAmpPrivate($v['domain']);
|
|
149
|
|
149
|
|