作者 Your Name
... ... @@ -94,16 +94,16 @@ class RemainDay extends Command
}
}
$item->remain_day = ($remain_day > 0 ? $remain_day : 0);
if($item->remain_day == 0){
$item->extend_type = Project::TYPE_FIVE;
$item->site_status = Project::TYPE_ONE;//关闭站点
//TODO::未续费网站禁止登录及通知C端禁止网站
$domainModel = new DomainInfoModel();
$domainInfos = $domainModel->read(['project_id'=>$item->id]);
if($domainInfos !== false){
curl_get('https://'.$domainInfos['domain'].'/api/stop_or_start_website/');
}
}
// if($item->remain_day == 0){
// $item->extend_type = Project::TYPE_FIVE;
// $item->site_status = Project::TYPE_ONE;//关闭站点
// //TODO::未续费网站禁止登录及通知C端禁止网站
// $domainModel = new DomainInfoModel();
// $domainInfos = $domainModel->read(['project_id'=>$item->id]);
// if($domainInfos !== false){
// curl_get('https://'.$domainInfos['domain'].'/api/stop_or_start_website/');
// }
// }
$item->save();
}
}
... ...
... ... @@ -371,6 +371,9 @@ class ProjectController extends BaseController
}
}
}
if(!empty($item['extend_type'])){
$item['type'] = $item['extend_type'];
}
$manageModel = new ManageHr();
$item['channel'] = Channel::getChannelText($item['channel']['user_id'] ?? 0);
$item['build_leader'] = $manageModel->getName($item['leader_mid']);
... ...
... ... @@ -68,6 +68,11 @@ class RenewLogic extends BaseLogic
* @time :2023/9/19 10:21
*/
public function editProjectRenew(){
if($this->param['renew_id'] == 0){
$info = [
'api_no'=>0,
];
}else{
//获取续费单详情
$info = $this->model->read(['id'=>$this->param['renew_id']]);
if($info === false){
... ... @@ -76,6 +81,7 @@ class RenewLogic extends BaseLogic
if($info['project_id'] != 0){
$this->fail('当前续费单已关联项目,请重新选择');
}
}
DB::beginTransaction();
try {
$this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id']],['id'=>$this->param['renew_id']]);
... ...