作者 李宇航

合并分支 'master-server' 到 'master'

续费单设置。



查看合并请求 !862
... ... @@ -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,13 +68,19 @@ class RenewLogic extends BaseLogic
* @time :2023/9/19 10:21
*/
public function editProjectRenew(){
//获取续费单详情
$info = $this->model->read(['id'=>$this->param['renew_id']]);
if($info === false){
$this->fail('当前续费单不存在');
}
if($info['project_id'] != 0){
$this->fail('当前续费单已关联项目,请重新选择');
if($this->param['renew_id'] == 0){
$info = [
'api_no'=>0,
];
}else{
//获取续费单详情
$info = $this->model->read(['id'=>$this->param['renew_id']]);
if($info === false){
$this->fail('当前续费单不存在');
}
if($info['project_id'] != 0){
$this->fail('当前续费单已关联项目,请重新选择');
}
}
DB::beginTransaction();
try {
... ...