|
...
|
...
|
@@ -31,22 +31,19 @@ class RemainDay extends Command |
|
|
|
];//需要单独处理的项目
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int[]
|
|
|
|
* 按照达标天数收费的项目(白帽)
|
|
|
|
*/
|
|
|
|
protected $bm_projectId = [
|
|
|
|
4247,4299,4310,4215,4038,4084,4148
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var 暂停的项目
|
|
|
|
*/
|
|
|
|
protected $ceaseProjectId = [
|
|
|
|
354,
|
|
|
|
378,
|
|
|
|
649,
|
|
|
|
1226,
|
|
|
|
1283,
|
|
|
|
1703,
|
|
|
|
1893,
|
|
|
|
2066,
|
|
|
|
2250,
|
|
|
|
2193,
|
|
|
|
2399,
|
|
|
|
1685,
|
|
|
|
3309
|
|
|
|
354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3309
|
|
|
|
];//需要单独处理的项目
|
|
|
|
/**
|
|
|
|
* The console command description.
|
|
...
|
...
|
@@ -123,11 +120,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']]);
|
...
|
...
|
|