正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -84,11 +84,11 @@ class RemainDay extends Command | @@ -84,11 +84,11 @@ class RemainDay extends Command | ||
| 84 | */ | 84 | */ |
| 85 | public function saveSeoRemainDay(){ | 85 | public function saveSeoRemainDay(){ |
| 86 | $projectArr = $this->deployBuild->selectField(['seo_plan'=>1],'project_id'); | 86 | $projectArr = $this->deployBuild->selectField(['seo_plan'=>1],'project_id'); |
| 87 | - $data = $this->project->list(['id'=>['in',$projectArr]],'id',['id','uptime']); | 87 | + $data = $this->project->list(['id'=>['in',$projectArr]],'id',['id','uptime','finish_remain_day']); |
| 88 | foreach ($data as $item){ | 88 | foreach ($data as $item){ |
| 89 | if($item['uptime']){ | 89 | if($item['uptime']){ |
| 90 | - $diff = time() - strtotime($item->uptime); | ||
| 91 | - $item->finish_remain_day = floor($diff / (60 * 60 * 24)); | 90 | + $diff = time() - strtotime($item['uptime']); |
| 91 | + $item['finish_remain_day'] = floor($diff / (60 * 60 * 24)); | ||
| 92 | $seo_remain_day = $item['deploy_build']['seo_service_duration'] - floor($diff / (60 * 60 * 24)); | 92 | $seo_remain_day = $item['deploy_build']['seo_service_duration'] - floor($diff / (60 * 60 * 24)); |
| 93 | }else{ | 93 | }else{ |
| 94 | $seo_remain_day = $item['deploy_build']['seo_service_duration']; | 94 | $seo_remain_day = $item['deploy_build']['seo_service_duration']; |
-
请 注册 或 登录 后发表评论