|
...
|
...
|
@@ -63,7 +63,7 @@ class DomainInfo extends Command |
|
|
|
public function startUpdateDomain()
|
|
|
|
{
|
|
|
|
$domainModel = new DomainInfoModel();
|
|
|
|
$list = $domainModel->where('status', '!=', 2)->where(function ($query) {
|
|
|
|
$list = $domainModel->where('status', '=', 1)->where(function ($query) {
|
|
|
|
$query->whereNull('domain_end_time')->orWhere('domain_end_time', '<', date('Y-m-d H:i:s'));
|
|
|
|
})->get()->toArray();
|
|
|
|
foreach ($list as $v) {
|
|
...
|
...
|
@@ -87,7 +87,7 @@ class DomainInfo extends Command |
|
|
|
$domainModel = new DomainInfoModel();
|
|
|
|
$projectModel = new Project();
|
|
|
|
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
|
|
|
|
$list = $domainModel->where('status', '!=', 2)->where(function ($query) use ($end_day) {
|
|
|
|
$list = $domainModel->where('status', '=', 1)->where(function ($query) use ($end_day) {
|
|
|
|
$query->whereNull('certificate_end_time')->orWhere('certificate_end_time', '<', $end_day);
|
|
|
|
})->get()->toArray();
|
|
|
|
foreach ($list as $v) {
|
|
...
|
...
|
@@ -99,7 +99,7 @@ class DomainInfo extends Command |
|
|
|
$ssl['to'] && $data['certificate_end_time'] = $ssl['to'];
|
|
|
|
|
|
|
|
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
|
|
|
|
if ($v['type'] == 1 && $ssl['to'] < $end_day && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
|
|
|
if ($v['type'] == 1 && $ssl['to'] < $end_day && $project_info && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
|
|
|
//非自建站项目,申请免费证书
|
|
|
|
$this->updatePrivate($v);
|
|
|
|
|
|
...
|
...
|
@@ -122,7 +122,7 @@ class DomainInfo extends Command |
|
|
|
$domainModel = new DomainInfoModel();
|
|
|
|
$projectModel = new Project();
|
|
|
|
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
|
|
|
|
$list = $domainModel->where('status', '!=', 2)->where('amp_status', 1)->where(function ($query) use ($end_day) {
|
|
|
|
$list = $domainModel->where('status', '=', 1)->where('amp_status', 1)->where(function ($query) use ($end_day) {
|
|
|
|
$query->whereNull('amp_certificate_end_time')->orWhere('amp_certificate_end_time', '<', $end_day);
|
|
|
|
})->get()->toArray();
|
|
|
|
foreach ($list as $v) {
|
|
...
|
...
|
@@ -143,7 +143,7 @@ class DomainInfo extends Command |
|
|
|
$ssl['to'] && $data['amp_certificate_end_time'] = $ssl['to'];
|
|
|
|
|
|
|
|
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
|
|
|
|
if ($v['amp_type'] == 1 && $ssl['to'] < $end_day && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
|
|
|
if ($v['amp_type'] == 1 && $ssl['to'] < $end_day && $project_info && $project_info['serve_id'] != ServerConfig::SELF_SITE_ID) {
|
|
|
|
//非自建站项目,申请免费证书
|
|
|
|
$this->updateAmpPrivate($v['domain']);
|
|
|
|
|
...
|
...
|
|