|
...
|
...
|
@@ -31,6 +31,13 @@ class RemainDay extends Command |
|
|
|
];//需要单独处理的项目
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int[]
|
|
|
|
* 按照达标天数收费的项目
|
|
|
|
*/
|
|
|
|
protected $bm_projectId = [];
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var 暂停的项目
|
|
|
|
*/
|
|
|
|
protected $ceaseProjectId = [
|
|
...
|
...
|
@@ -123,11 +130,13 @@ class RemainDay extends Command |
|
|
|
//白帽版本的系统
|
|
|
|
if($deploy_build['seo_plan'] == 1){
|
|
|
|
if($deploy_build['seo_service_duration'] != 0){
|
|
|
|
if($item['bm_finish_remain_day']){
|
|
|
|
$compliance_day = (int)$item['bm_finish_remain_day'];
|
|
|
|
$seo_remain_day = $deploy_build['seo_service_duration'] - $compliance_day;
|
|
|
|
if(in_array($item['id'],$this->bm_projectId)){
|
|
|
|
$seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day'];
|
|
|
|
}else{
|
|
|
|
$seo_remain_day = $deploy_build['seo_service_duration'];
|
|
|
|
//按自然日统计
|
|
|
|
$diff = time() - strtotime($item['uptime']);
|
|
|
|
$compliance_day = floor($diff / (60 * 60 * 24));
|
|
|
|
$seo_remain_day = $deploy_build['service_duration'] - $compliance_day;
|
|
|
|
}
|
|
|
|
if($deploy_build['plan'] == 0 && $seo_remain_day < 0 && $deploy_build['seo_service_duration'] != 0){//只有白帽版本的项目且剩余服务时常为0,放入未续费中
|
|
|
|
// $this->project->edit(['seo_remain_day'=>$seo_remain_day,'finish_remain_day'=>$compliance_day ?? 0,'extend_type'=>Project::TYPE_FIVE],['id'=>$item['id']]);
|
...
|
...
|
|