|
...
|
...
|
@@ -84,11 +84,11 @@ class RemainDay extends Command |
|
|
|
*/
|
|
|
|
public function saveSeoRemainDay(){
|
|
|
|
$projectArr = $this->deployBuild->selectField(['seo_plan'=>1],'project_id');
|
|
|
|
$data = $this->project->list(['id'=>['in',$projectArr]],'id',['id','uptime']);
|
|
|
|
$data = $this->project->list(['id'=>['in',$projectArr]],'id',['id','uptime','finish_remain_day']);
|
|
|
|
foreach ($data as $item){
|
|
|
|
if($item['uptime']){
|
|
|
|
$diff = time() - strtotime($item->uptime);
|
|
|
|
$item->finish_remain_day = floor($diff / (60 * 60 * 24));
|
|
|
|
$diff = time() - strtotime($item['uptime']);
|
|
|
|
$item['finish_remain_day'] = floor($diff / (60 * 60 * 24));
|
|
|
|
$seo_remain_day = $item['deploy_build']['seo_service_duration'] - floor($diff / (60 * 60 * 24));
|
|
|
|
}else{
|
|
|
|
$seo_remain_day = $item['deploy_build']['seo_service_duration'];
|
...
|
...
|
|